summaryrefslogtreecommitdiff
path: root/src/conf_mode/system-options.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/system-options.py')
-rwxr-xr-xsrc/conf_mode/system-options.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/system-options.py b/src/conf_mode/system-options.py
index 74c34e19f..a893e98b3 100755
--- a/src/conf_mode/system-options.py
+++ b/src/conf_mode/system-options.py
@@ -57,7 +57,8 @@ def apply(opt):
# Ctrl-Alt-Delete action
if opt['ctrl_alt_del'] == 'ignore':
- os.unlink('/lib/systemd/system/ctrl-alt-del.target')
+ if os.path.exists(systemd_ctrl_alt_del):
+ os.unlink('/lib/systemd/system/ctrl-alt-del.target')
elif opt['ctrl_alt_del'] == 'reboot':
if os.path.exists(systemd_ctrl_alt_del):