Package: shutdown-at-night Version: 0.14 Severity: important Tags: patch
The gdm3 greeter seems to be a special gnome-session running as a user
with name '(unknown)'. shutdown-at-night uses 'who' to decide if users
are still active but doesn't recognize this very case.
The patch has been tested and commited to git.
(wheezy is affected as well, version: 0.10+deb7u2)
diff --git a/shutdown-at-night b/shutdown-at-night
index 4427ef7..9411014 100755
--- a/shutdown-at-night
+++ b/shutdown-at-night
@@ -98,7 +98,7 @@ prepare_wakeonlan() {
# Return true if local user is logged in, false otherwise
is_local_user() {
- if [ "$(who)" ] ; then
+ if [ "$(who | grep -v '\(unknown\)')" ] ; then
return 0
else
return 1
Wolfgang
signature.asc
Description: Digital signature

