Bug#775608: shutdown-at-night: fails to shut down the system if gdm3 is used
Wolfgang Schweer
wschweer at arcor.de
Sat Jan 17 22:56:37 UTC 2015
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-edu-pkg-team/attachments/20150117/0c4e1bb1/attachment.sig>
More information about the Debian-edu-pkg-team
mailing list