diff options
author | hydrajump <wave@hydrajump.com> | 2014-04-10 14:19:10 +0200 |
---|---|---|
committer | hydrajump <wave@hydrajump.com> | 2014-04-10 14:19:10 +0200 |
commit | 2edb636e0bbdcba17edb1e88db568fc7508eedf5 (patch) | |
tree | b488b45b3f620c6ed1ae46d132625f8f06324500 /templates/system | |
parent | cbfe963979e95829365d2d18c3cd2218109ee707 (diff) | |
download | vyatta-cfg-system-2edb636e0bbdcba17edb1e88db568fc7508eedf5.tar.gz vyatta-cfg-system-2edb636e0bbdcba17edb1e88db568fc7508eedf5.zip |
Add syntax check to validate value
Diffstat (limited to 'templates/system')
-rw-r--r-- | templates/system/options/ctrl-alt-del-action/node.def | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/system/options/ctrl-alt-del-action/node.def b/templates/system/options/ctrl-alt-del-action/node.def index 8ee98ce8..8a5ed9d5 100644 --- a/templates/system/options/ctrl-alt-del-action/node.def +++ b/templates/system/options/ctrl-alt-del-action/node.def @@ -8,6 +8,8 @@ val_help: disable; Disable Ctrl-Alt-Delete val_help: reboot; Reboot VyOS val_help: poweroff; Poweroff VyOS +syntax:expression: $VAR(@) in "disable", "reboot", "poweroff"; "Value must be disable, reboot, or poweroff" + end: if [ $VAR(@) == "disable" ]; then sudo sh -c "sed -i -e 's/^ca.*/ca:12345:ctrlaltdel:/' \ |