blob: a853b15189df6499ad701453b2f80347504d07ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
type: txt
help: Ctrl-Alt-Delete action
default: "ignore"
val_help: ignore; Ignore Ctrl-Alt-Delete
val_help: reboot; Reboot VyOS
val_help: poweroff; Poweroff VyOS
syntax:expression: $VAR(@) in "ignore", "reboot", "poweroff"; "Value must be ignore, reboot, or poweroff"
end:
if [ $VAR(@) == "ignore" ]; then
sudo sh -c "ln -sf /dev/null \
/lib/systemd/system/ctrl-alt-del.target"
elif [ $VAR(@) == "reboot" ]; then
sudo sh -c "ln -sf /lib/systemd/system/reboot.target \
/lib/systemd/system/ctrl-alt-del.target"
elif [ $VAR(@) == "poweroff" ]; then
sudo sh -c "ln -sf /lib/systemd/system/poweroff.target \
/lib/systemd/system/ctrl-alt-del.target"
fi
# Reload systemd daemon for change to take effect
sudo /bin/systemctl daemon-reload
|