diff options
author | Erich Eckner <git@eckner.net> | 2016-05-04 11:14:03 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-05-04 13:08:24 +0200 |
commit | b0eb23c0930611889ed615bc2f431e30b35bbbbe (patch) | |
tree | bd469e9cc9797180b1eb9f14e3325cbfd6124617 /shutdownasap | |
parent | 7a3b06c77c3d515c613a1fc1e8ee95fe76428c59 (diff) | |
download | shutdownasap-b0eb23c0930611889ed615bc2f431e30b35bbbbe.tar.xz |
Makefile, manpage neu, Versionsupdatev0.2
Diffstat (limited to 'shutdownasap')
-rwxr-xr-x | shutdownasap | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/shutdownasap b/shutdownasap deleted file mode 100755 index 027511b..0000000 --- a/shutdownasap +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -. /etc/shutdownasap.conf - -[ -r "${pidFile}" ] && ps aux | grep -q "^\S\+\s\+$(cat "${pidFile}") " && exit - -echo $$ > "${pidFile}" - -beforeWatchHook - -i=1 -while [ ${i} -gt 0 ] -do - sleep 1 - prozesse="$(ps aux | grep -v grep)" - - nochwarten=false - - if [ -d "${waitForDir}" ] && ls -1A "${waitForDir}" | grep -q "." - then - nochwarten=true - echo ".warteauf: " - ls -1A "${waitForDir}" - fi - - if users | grep -q "." - then - nochwarten=true - echo -n "users: " - users - fi - - for synActFile in /sys/block/md*/md/sync_action - do - if [ -r "${synActFile}" ] && ! grep -q "^idle\$" "${synActFile}" - then - nlochWarten=true - echo -n "raid ${synActFile}: " - cat "${synActFile}" - fi - done - - for s in "${!shutDownNoGos[@]}" - do - if [ -e "${shutDownNoGos[${s}]}" ] || echo "${prozesse}" | grep -q "\(\s\|/\)${shutDownNoGos[${s}]}\(\$\|\s\)" - then - nochwarten=true - echo "prozess: ${s}" - fi - done - - if ${nochwarten} - then - echo "warten ..." - i=10 - continue - else - echo "noch ${i} Sekunden" - fi - i=$[${i}-1] -done - -beforeShutDownHook - -sudo /sbin/poweroff |