X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/819018a97971abf10d03cb85ed13536475af2dd0..ab46a7872ac5f10d0c96e7bba5b927b186442a2f:/init/tripe-init.in diff --git a/init/tripe-init.in b/init/tripe-init.in index e609a653..dfa7e031 100755 --- a/init/tripe-init.in +++ b/init/tripe-init.in @@ -10,11 +10,11 @@ set -e [ -f @initconfig@ ] && . @initconfig@ : ${prefix=@prefix@} ${exec_prefix=@exec_prefix@} : ${bindir=@bindir@} ${sbindir=@sbindir@} -: ${TRIPEDIR=@configdir@} ${tripesock=@socketdir@/tripesock} +: ${TRIPEDIR=@configdir@} ${TRIPESOCK=@socketdir@/tripesock} : ${pidfile=@pidfile@} : ${tripe=$sbindir/tripe} ${tripectl=$bindir/tripectl} PATH=/usr/bin:/usr/sbin:/bin:/sbin:$bindir -export PATH TRIPEDIR +export PATH TRIPEDIR TRIPESOCK # --- Give up if there's no key --- @@ -33,7 +33,7 @@ case ${tunnel-`$tripe --tunnels | head -1`} in linux) case `uname -s` in Linux) - if { test -f /proc/misc && grep -q net/tun /proc/misc; } || + if { test -f /proc/misc && grep -q tun /proc/misc; } || modprobe -q tun; then : good else @@ -106,7 +106,7 @@ case ${tunnel-`$tripe --tunnels | head -1`} in fi ;; esac - + # --- Do what was wanted --- case "$1" in @@ -122,8 +122,8 @@ case "$1" in ${keytag+-S-t}$keytag \ ${addr+-S-b}$addr \ ${port+-S-p}${port} \ - ${user+-S-u}${user} \ - ${group+-S-g}${group} \ + ${user+-U}${user} \ + ${group+-G}${group} \ ${trace+-S-T}${trace} \ ${tunnel+-S-n}${tunnel} \ ${miscopts} @@ -140,23 +140,23 @@ case "$1" in [ -x $i ] || continue name=`basename $i` case $name in *~|\#*) continue;; esac - if $i; then + if $i; then echo -n " $name" else - echo -n " ($name failed)" + echo -n " ($name failed)" fi done echo " done" ;; stop) echo -n "Stopping TrIPE VPN daemon:" - if test ! -S $tripesock; then + if test ! -S $TRIPESOCK; then echo " not running" elif $tripectl quit >/dev/null 2>&1; then echo " done" elif test ! -f $pidfile; then echo " stale socket found: removing" - rm -f $tripesock + rm -f $TRIPESOCK elif kill `cat $pidfile`; then echo " done (killed violently)" else