=== modified file 'bin/ssh-slave' --- bin/ssh-slave 2015-02-17 23:27:27 +0000 +++ bin/ssh-slave 2014-02-14 02:27:12 +0000 @@ -1,10 +1,6 @@ #!/bin/zsh -have_log=0 die() { - (($#)) && print -r - "$*" >&2 - for jnum jtext in ${(kv)jobtexts}; do - kill %$jnum - done + (($#)) && print -r - "$*" exit 1 } @@ -12,7 +8,6 @@ -o ControlMaster=no -o PubkeyAuthentication=no -o KbdInteractiveAuthentication=no - -o PasswordAuthentication=no ) # prevent logging to syslog instead of stderr @@ -54,24 +49,6 @@ else usv.bg $svdir || die fi - while ! [[ -e $s/supervise/control ]]; do - sleep 0.1 - done - have_log=0 - if [[ -r /var/log/msg/current ]]; then - tail -F -n 0 /var/log/msg/current | grep ' ssh\[[0-9]\+\]: ' >&2 & - have_log=1 - fi - printf o >$s/supervise/control || die - out=$(sv check $s 2>&1$) || die $out - if (($have_log)); then - for jnum jtext in ${(kv)jobtexts}; do - kill %$jnum - done - wait - fi - if [[ "$(<$s/supervise/stat)" != run* ]];then - die 'could not start ssh master' - fi + sv once $s >/dev/null || die fi exec ssh $noconnect "$@"