=== modified file 'sbin/zsvwait' --- sbin/zsvwait 2014-02-28 18:48:58 +0000 +++ sbin/zsvwait 2014-02-28 17:57:44 +0000 @@ -1,23 +1,10 @@ #!/bin/zsh -zmodload zsh/datetime setopt extendedglob zsvgen - -check_runsv() { - while (($#)); do - [[ -a $1/supervise/control ]] || return $? - done -} - -START=$EPOCHREALTIME - services_pre='' -services=( /run/service/*/run(-*) ); services=( $services:h ) +services=( /run/service/*(-/) ) while [[ ${(F)services} != $services_pre ]]; do - while (( $EPOCHREALTIME - $START < 10 )) && !check_runsv $services; do - inotifywait -r -q -t 1 -e create,move,close_write, - done sv check $services services_pre="${(F)services}" - services=( /run/service/*/run(-*) ); services=( $services:h ) + services=( /run/service/*(-/) ) done