[debian-edu-commits] debian-edu/ 01/01: Adjust the 'who' command to exclude the special case of gdm3 greeter running as user '(unknown)' to be assumed as a logged in user.

Wolfgang Schweer schweer-guest at moszumanska.debian.org
Sat Jan 17 22:56:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

schweer-guest pushed a commit to branch master
in repository shutdown-at-night.

commit ac00daadbb57d5db3e338bd615f97c1bd99cbb01
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Sat Jan 17 23:55:30 2015 +0100

    Adjust the 'who' command to exclude the special case of gdm3 greeter running as user '(unknown)' to be assumed as a logged in user.
---
 debian/changelog  | 7 +++++++
 shutdown-at-night | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 5470a0a..6c9e8ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+shutdown-at-night (0.15) UNRELEASED; urgency=medium
+
+  * Adjust the 'who' command to exclude the special case of gdm3 greeter
+    running as user '(unknown)' to be assumed as a logged in user.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Sat, 17 Jan 2015 21:35:42 +0100
+
 shutdown-at-night (0.14) unstable; urgency=low
 
   * Updated Standards-Version from 3.9.4 to 3.9.5.  No changes needed
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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/shutdown-at-night.git



More information about the debian-edu-commits mailing list