From 2edb636e0bbdcba17edb1e88db568fc7508eedf5 Mon Sep 17 00:00:00 2001 From: hydrajump Date: Thu, 10 Apr 2014 14:19:10 +0200 Subject: Add syntax check to validate value --- templates/system/options/ctrl-alt-del-action/node.def | 2 ++ 1 file changed, 2 insertions(+) (limited to 'templates') 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:/' \ -- cgit v1.2.3