=== modified file 'sbin/runsvdirboot' --- sbin/runsvdirboot 2015-12-08 10:54:51 +0000 +++ sbin/runsvdirboot 2015-10-21 14:14:59 +0000 @@ -1,56 +1,10 @@ #!/bin/zsh -l -# vim: fileencoding=utf-8 ft=zsh noet sw=4 ts=4 sts=4 - -zparseopts -D \ - h=H -help=H \ - -default+:=STATE \ - u+:=UP -up+:=UP \ - d+:=DOWN -down+:=DOWN - -if [[ -n $H ]]; then cat <&2 "Invalid default state: '%s'\n" $STATE - exit 2 -fi - [[ -r /etc/zsh/zlogin ]] && source /etc/zsh/zlogin [[ -r /etc/zsh/zprofile ]] && source /etc/zsh/zprofile - SVDIR=${1:-${SVDIR:-/run/service}} export SVDIR - mkdir -p ${SVDIR} - - -if [[ $DEFAULT == up ]]; then - zsvgen --all-up -elif [[ $DEFAULT == down ]]; then - zsvgen --all-down -fi - -for flag pat in "$UP[@]"; do - zsvgen --all-up --filter $pat -done - -for flag pat in "$DOWN[@]"; do - zsvgen --all-down --filter $pat -done - +zsvgen --all-down # close filedescriptors and run runsvdir with some place to log exec <& - >& - 2>& - \ runsvdir -P ${SVDIR} \