Browse Source

Merge pull request #28 from l1k/master

shutdown/shutdown.sh: loop over shutdown hooks until all succeed
master
Harald Hoyer 10 years ago
parent
commit
84125ddae1
  1. 9
      modules.d/99shutdown/shutdown.sh

9
modules.d/99shutdown/shutdown.sh

@ -90,16 +90,19 @@ _check_shutdown() { @@ -90,16 +90,19 @@ _check_shutdown() {
( . "$__f" $1 )
if [ $? -eq 0 ]; then
rm -f -- $__f
else
__s=0
fi
done
return $__s
}

while _check_shutdown; do
:
_cnt=0
while [ $_cnt -le 40 ]; do
_check_shutdown || break
_cnt=$(($_cnt+1))
done
_check_shutdown final
[ $_cnt -ge 40 ] && _check_shutdown final

getarg 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before shutdown"


Loading…
Cancel
Save