Package: shutdown-at-night
Version: 0.8
Severity: normal
Tags: patch
The check for logged in users doesn't detect running gridengine jobs. Also, it
is possible that the hourly cron job to shutdown comes a few minutes after
booting, but before a user has logged in.
A potential patch is:
*** /usr/lib/shutdown-at-night/shutdown-at-night 2010-03-03
16:07:46.000000000 -0500
--- /root/shutdown-at-night 2011-03-28 10:39:10.000000000 -0400
***************
*** 66,71 ****
--- 66,80 ----
if [ "$(who)" ] || ps -efwww | egrep -q ' ssh .*LTSP_CLIEN[T]' ; then
return 1
fi
+ # Uptime is less than one hour
+ if (( $(cat /proc/uptime | awk '{print int($1)}') < 3600 )) ; then
+ return 1
+ fi
+ # Gridengine jobs running
+ if type qstat &>/dev/null && [[ -n $(qstat -ne -f -q *@$(hostname) ) ]] ;
then
+ return 1
+ fi
return 0
}
I'm going to test this on a few debian installs and will follow up if there are
any problems
-- System Information:
Debian Release: 6.0.1
APT prefers oldstable
APT policy: (500, 'oldstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages shutdown-at-night depends on:
ii cron 3.0pl1-116 process scheduling daemon
ii fping 2.4b2-to-ipv6-16.1 sends ICMP ECHO_REQUEST packets to
ii ng-utils 0.7-1 Tool to access netgroups from the
ii perl 5.10.1-17 Larry Wall's Practical Extraction
ii wakeonlan 0.41-10 Sends 'magic packets' to wake-on-L
Versions of packages shutdown-at-night recommends:
ii nvram-wakeup 1.1-1 A tool to read/write the WakeUp ti
Versions of packages shutdown-at-night suggests:
pn sitesummary <none> (no description available)
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]