initial thridculture edits
This commit is contained in:
commit
0ba2a2e03b
172 changed files with 6733 additions and 24 deletions
|
|
@ -23,7 +23,8 @@ if(~ $"user_name '' || ~ $"user_pass '')
|
|||
usage
|
||||
|
||||
mkdir etc/users/$user_name
|
||||
echo $user_pass > etc/users/$user_name/password
|
||||
mkpasswd $user_pass > etc/users/$user_name/password
|
||||
#htpasswd -b /etc/lighttpd/.htpasswd $user_name $user_pass
|
||||
|
||||
if(! ~ $#user_groups 0)
|
||||
for(g in $user_groups) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ if(~ $#file 0 || ! test -f $file) {
|
|||
}
|
||||
|
||||
$EDITOR $file
|
||||
ispell $file
|
||||
aspell -c $file
|
||||
rm $file.bak >[2]/dev/null
|
||||
|
||||
fn mkbpost {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ path=($PLAN9/bin $rc_httpd_dir/handlers $PATH)
|
|||
cgi_path=$PLAN9/bin
|
||||
SERVER_PORT=80 # default for CGI scripts, may be overridden by the Host header
|
||||
extra_headers='Server: rc-httpd'
|
||||
cr=
|
||||
cr=
|
||||
|
||||
fn do_log{
|
||||
echo `{date} :: $SERVER_NAME :: $request :: \
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ fn nav_tree {
|
|||
if(! ~ $#synth_paths 0) echo $synth_paths | tr ' ' $NEW_LINE
|
||||
} | sort -u | awk -F/ '
|
||||
function p(x, y, s) { for(i=0; i < x-y; i+=1) print s }
|
||||
BEGIN { lNF=2; print "<ul>" }
|
||||
BEGIN { lNF=2; print "<ul><li><a href='/'>› <span class='dt'>home</span></a></li>" }
|
||||
{
|
||||
d = ""
|
||||
if(match($0, "/$"))
|
||||
|
|
@ -31,9 +31,9 @@ fn nav_tree {
|
|||
gsub(/[^\/]$/, "&/", pa)
|
||||
|
||||
if(index(ENVIRON["req_path"] "/", pa) == 1)
|
||||
print "<li><a href=\"" path "\" class=\"thisPage\">»<i> " bname "</i></a></li>"
|
||||
print "<li><a href=\"" path "\" class=\"thisPage\">» <i><span class='dt'>" bname "</span></i></a></li>"
|
||||
else
|
||||
print "<li><a href=\"" path "\">› " bname "</a></li>"
|
||||
print "<li><a href=\"" path "\">› <span class='dt'>" bname "</span></a></li>"
|
||||
}
|
||||
END { p(lNF, 2, "</ul></li>"); print "</ul>" }'
|
||||
}
|
||||
|
|
@ -116,8 +116,13 @@ fn setup_handlers {
|
|||
for(a in $enabled_apps)
|
||||
$a^'_init'
|
||||
|
||||
if(! ~ $#handler_body_main 0)
|
||||
{ } # We are done
|
||||
if(! ~ $#handler_body_main 0) {
|
||||
# WE ARE NOT DONE I WANT MY HEADERS
|
||||
if(test -f $sitedir$req_path'_header.md')
|
||||
ll_add handlers_body_head md_handler $sitedir$req_path'_header.md'
|
||||
if(test -f $sitedir$req_path'_footer.md')
|
||||
ll_add handlers_body_foot md_handler $sitedir$req_path'_footer.md'
|
||||
} # We are done
|
||||
# Dir listing
|
||||
if not if(~ $local_path */index) {
|
||||
handler_body_main=(dir_listing_handler $req_path)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ fn auth_user {
|
|||
status=('Auth: missing user name or pass: '^$"user_name^' / '^$"user_password)
|
||||
if not if(! test -f $pfile)
|
||||
status=('Auth: cant find '^$pfile)
|
||||
if not if(! test -s $pfile || ! ~ $user_password `{cat $pfile})
|
||||
if not if(! test -s $pfile || ! ~ `{mkpasswd -S `{cat $pfile | cut -d'$' -f3} $user_password} `{cat $pfile})
|
||||
status=('Auth: Pass '$user_password' doesnt match '^`{cat $pfile})
|
||||
if not {
|
||||
logged_user=$user_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue