From 7e2a31dc6262cbeaa2e0090993ff1fbb76a9092d Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Wed, 27 Mar 2002 21:16:54 +0000 Subject: allow_reboot: only touch the shutdown, poweroff, reboot and halt files if they don't exist. --- share/libmsec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'share/libmsec.py') diff --git a/share/libmsec.py b/share/libmsec.py index 3004963..2827ca3 100644 --- a/share/libmsec.py +++ b/share/libmsec.py @@ -209,7 +209,8 @@ def allow_reboot(arg): _interactive and log(_('Allowing reboot to the console user')) shutdownallow.exists() and shutdownallow.move(SUFFIX) for f in [SHUTDOWN, POWEROFF, REBOOT, HALT]: - ConfigFile.get_config_file(f).touch() + cfg = ConfigFile.get_config_file(f) + cfg.exists() or cfg.touch() sysctlconf.set_shell_variable('kernel.sysrq', 1) kdmrc.exists() and kdmrc.set_shell_variable('AllowShutdown', 'All', 'X-:\*-Greeter', '^\s*$') gdmconf.exists() and gdmconf.set_shell_variable('SystemMenu', 'true', '\[greeter\]', '^\s*$') -- cgit v1.2.1