From: <dom...@us...> - 2017-09-09 12:27:52
|
Revision: 883 http://sourceforge.net/p/fvwm-crystal/code/883 Author: dominique_libre Date: 2017-09-09 12:27:49 +0000 (Sat, 09 Sep 2017) Log Message: ----------- fix systemctl to work with sudo and multi users Modified Paths: -------------- ChangeLog fvwm/components/functions/Exit fvwm/components/functions/Exit-systemctl fvwm/scripts/AutoHibernate shared/fvwm-crystal.sudoers.d Modified: ChangeLog =================================================================== --- ChangeLog 2017-07-24 10:39:36 UTC (rev 882) +++ ChangeLog 2017-09-09 12:27:49 UTC (rev 883) @@ -1,5 +1,10 @@ ChangeLog for FVWM-Crystal +samedi 9 septembre 2017 + functions/Exit, functions/Exit-systemctl, scripts/Autohibernate: add -i option to force + commands when another user is logged in. + shared/fvwm-crystal.sudoers.d: add systemctl, + lundi 15 mai 2017 functions/Exit, scripts/AutoHibernate: add auto hibernation support for systemd Modified: fvwm/components/functions/Exit =================================================================== --- fvwm/components/functions/Exit 2017-07-24 10:39:36 UTC (rev 882) +++ fvwm/components/functions/Exit 2017-09-09 12:27:49 UTC (rev 883) @@ -67,8 +67,8 @@ Test (x /usr/sbin/pm-hibernate) + '%22x22/fvwm-crystal/gdm.png%$[gt.Suspend to disk]' S pm-hibernate Test (x /usr/sbin/pm-powersave) + '%22x22/fvwm-crystal/gdm.png%$[gt.Powersave]' S pm-powersave Test (x /usr/bin/systemctl) + '' Nop -Test (x /usr/bin/systemctl) + '%22x22/fvwm-crystal/gdm.png%$[gt.Resume to RAM]' S systemctl suspend -Test (X systemctl) + '%22x22/fvwm-crystal/gdm.png%$[gt.Suspend to disk]' S systemctl hibernate +Test (x /usr/bin/systemctl) + '%22x22/fvwm-crystal/gdm.png%$[gt.Resume to RAM]' S systemctl suspend -i +Test (X systemctl) + '%22x22/fvwm-crystal/gdm.png%$[gt.Suspend to disk]' S systemctl hibernate -i Test (EnvIsSet SESSION_MANAGER) + '' Nop Test (EnvIsSet SESSION_MANAGER) + '%22x22/fvwm-crystal/gdm.png%$[gt.Save session]' Exec exec gnome-session-save --gui Test (EnvIsSet SESSION_MANAGER) + '%22x22/fvwm-crystal/gdm.png%$[gt.Manage session]' Exec exec gnome-session-properties Modified: fvwm/components/functions/Exit-systemctl =================================================================== --- fvwm/components/functions/Exit-systemctl 2017-07-24 10:39:36 UTC (rev 882) +++ fvwm/components/functions/Exit-systemctl 2017-09-09 12:27:49 UTC (rev 883) @@ -3,7 +3,7 @@ AddToMenu /Exit Test (X systemctl) + "" Nop -Test (X systemctl) + '%22x22/fvwm-crystal/system-reboot.png%$[gt.Reboot computer]' S systemctl reboot -Test (X systemctl) + '%22x22/fvwm-crystal/system-shutdown.png%$[gt.Turn off computer]' S systemctl poweroff +Test (X systemctl) + '%22x22/fvwm-crystal/system-reboot.png%$[gt.Reboot computer]' S systemctl reboot -i +Test (X systemctl) + '%22x22/fvwm-crystal/system-shutdown.png%$[gt.Turn off computer]' S systemctl poweroff -i # vim:ft=fvwm Modified: fvwm/scripts/AutoHibernate =================================================================== --- fvwm/scripts/AutoHibernate 2017-07-24 10:39:36 UTC (rev 882) +++ fvwm/scripts/AutoHibernate 2017-09-09 12:27:49 UTC (rev 883) @@ -44,7 +44,7 @@ killall -9 mplayer 2>/dev/null if [[ "${2}" == "pm" ]] ; then sudo pm-hibernate - else sudo systemctl hibernate + else sudo systemctl hibernate -i fi # we must kill that script after rebbot to avoid loop Resumed="1" Modified: shared/fvwm-crystal.sudoers.d =================================================================== --- shared/fvwm-crystal.sudoers.d 2017-07-24 10:39:36 UTC (rev 882) +++ shared/fvwm-crystal.sudoers.d 2017-09-09 12:27:49 UTC (rev 883) @@ -7,3 +7,4 @@ %fvwm-crystal ALL=(ALL) NOPASSWD: /usr/sbin/pm-hibernate %fvwm-crystal ALL=(ALL) NOPASSWD: /usr/sbin/pm-suspend-hybrid %fvwm-crystal ALL=(ALL) NOPASSWD: /usr/sbin/pm-powersave +%fvwm-crystal ALL=(ALL) NOPASSWD: /usr/bin/systemctl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |