diff options
author | Kim <kim.sidney@gmail.com> | 2017-11-03 09:07:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-03 09:07:14 +0100 |
commit | e405a05d0a255a9f4d1d75b0462fae8e1756703e (patch) | |
tree | 350f4e5553d1334fa5a246d53483a2b4e66009f4 /templates | |
parent | 5333de74083111c23c7b8fb517d9924ba8afb9fd (diff) | |
parent | 67747479b2f6d4998687f5e7eec5c5923d913124 (diff) | |
download | vyatta-cfg-system-e405a05d0a255a9f4d1d75b0462fae8e1756703e.tar.gz vyatta-cfg-system-e405a05d0a255a9f4d1d75b0462fae8e1756703e.zip |
Merge pull request #65 from c-po/bugfixes
Bugfixes
Diffstat (limited to 'templates')
-rw-r--r-- | templates/system/options/ctrl-alt-del-action/node.def | 16 | ||||
-rw-r--r-- | templates/system/options/enable-popularity-contest/node.def | 9 |
2 files changed, 8 insertions, 17 deletions
diff --git a/templates/system/options/ctrl-alt-del-action/node.def b/templates/system/options/ctrl-alt-del-action/node.def index 3bbf2a81..a853b151 100644 --- a/templates/system/options/ctrl-alt-del-action/node.def +++ b/templates/system/options/ctrl-alt-del-action/node.def @@ -12,15 +12,15 @@ syntax:expression: $VAR(@) in "ignore", "reboot", "poweroff"; "Value must be ign end: if [ $VAR(@) == "ignore" ]; then - sudo sh -c "sed -i -e 's/^ca.*/ca:12345:ctrlaltdel:/' \ - /etc/inittab" + sudo sh -c "ln -sf /dev/null \ + /lib/systemd/system/ctrl-alt-del.target" elif [ $VAR(@) == "reboot" ]; then - sudo sh -c "sed -i -e 's/^ca.*/ca:12345:ctrlaltdel:\/sbin\/reboot/' \ - /etc/inittab" + sudo sh -c "ln -sf /lib/systemd/system/reboot.target \ + /lib/systemd/system/ctrl-alt-del.target" elif [ $VAR(@) == "poweroff" ]; then - sudo sh -c "sed -i -e 's/^ca.*/ca:12345:ctrlaltdel:\/sbin\/shutdown -h now/' \ - /etc/inittab" + sudo sh -c "ln -sf /lib/systemd/system/poweroff.target \ + /lib/systemd/system/ctrl-alt-del.target" fi - # Reload /etc/inittab for change to take effect - sudo /sbin/init q + # Reload systemd daemon for change to take effect + sudo /bin/systemctl daemon-reload diff --git a/templates/system/options/enable-popularity-contest/node.def b/templates/system/options/enable-popularity-contest/node.def deleted file mode 100644 index 3f048352..00000000 --- a/templates/system/options/enable-popularity-contest/node.def +++ /dev/null @@ -1,9 +0,0 @@ -help: Send anonymous system statistic to VyOS maintainers - -create: - sudo sh -c 'echo "#!/bin/sh" > /etc/cron.weekly/01vyos-popcon' - sudo sh -c 'echo "/opt/vyatta/bin/vyos-popcon.pl 2>&1 >/var/log/popcon.log" >> /etc/cron.weekly/01vyos-popcon' - sudo sh -c 'chmod +x /etc/cron.weekly/01vyos-popcon' - -delete: - sudo rm -f /etc/cron.weekly/01vyos-popcon |