diff options
author | hydrajump <wave@hydrajump.com> | 2014-04-10 14:05:21 +0200 |
---|---|---|
committer | hydrajump <wave@hydrajump.com> | 2014-04-10 14:05:21 +0200 |
commit | cbfe963979e95829365d2d18c3cd2218109ee707 (patch) | |
tree | 306a359fd77e379d81364322e29a45ac70f99e2d /templates/system | |
parent | 332f9266b2b09e7afec24a31075f8552a6765564 (diff) | |
download | vyatta-cfg-system-cbfe963979e95829365d2d18c3cd2218109ee707.tar.gz vyatta-cfg-system-cbfe963979e95829365d2d18c3cd2218109ee707.zip |
Use elif conditional instead of if
Diffstat (limited to 'templates/system')
-rw-r--r-- | templates/system/options/ctrl-alt-del-action/node.def | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/templates/system/options/ctrl-alt-del-action/node.def b/templates/system/options/ctrl-alt-del-action/node.def index d13fe3c5..8ee98ce8 100644 --- a/templates/system/options/ctrl-alt-del-action/node.def +++ b/templates/system/options/ctrl-alt-del-action/node.def @@ -12,14 +12,10 @@ end: if [ $VAR(@) == "disable" ]; then sudo sh -c "sed -i -e 's/^ca.*/ca:12345:ctrlaltdel:/' \ /etc/inittab" - fi - - if [ $VAR(@) == "reboot" ]; then + elif [ $VAR(@) == "reboot" ]; then sudo sh -c "sed -i -e 's/^ca.*/ca:12345:ctrlaltdel:\/sbin\/reboot/' \ /etc/inittab" - fi - - if [ $VAR(@) == "poweroff" ]; then + elif [ $VAR(@) == "poweroff" ]; then sudo sh -c "sed -i -e 's/^ca.*/ca:12345:ctrlaltdel:\/sbin\/shutdown -h now/' \ /etc/inittab" fi |