From 622bbf801bd435a3848c669ff2c0e9090cd2bb4e Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 31 Jan 2008 07:59:02 -0800 Subject: convert templates to new syntax --- templates/interfaces/bridge/node.def | 10 ++-- .../interfaces/bridge/node.tag/address/node.def | 14 ++--- .../interfaces/bridge/node.tag/aging/node.def | 6 +- .../bridge/node.tag/description/node.def | 2 +- .../interfaces/bridge/node.tag/disable/node.def | 8 +-- .../bridge/node.tag/forwarding-delay/node.def | 6 +- .../interfaces/bridge/node.tag/hello-time/node.def | 6 +- .../interfaces/bridge/node.tag/max-age/node.def | 6 +- templates/interfaces/bridge/node.tag/node.def | 2 +- .../interfaces/bridge/node.tag/priority/node.def | 6 +- templates/interfaces/bridge/node.tag/stp/node.def | 10 ++-- .../ethernet/node.tag/bridge-group/bridge/node.def | 18 +++--- .../ethernet/node.tag/bridge-group/cost/node.def | 6 +- .../ethernet/node.tag/bridge-group/node.def | 4 +- .../node.tag/bridge-group/priority/node.def | 6 +- .../vif/node.tag/bridge-group/bridge/node.def | 18 +++--- .../vif/node.tag/bridge-group/cost/node.def | 6 +- .../node.tag/vif/node.tag/bridge-group/node.def | 4 +- .../vif/node.tag/bridge-group/priority/node.def | 6 +- .../ethernet/node.tag/vif/node.tag/vrrp/node.def | 6 +- .../node.tag/vif/node.tag/vrrp/vrrp-group/node.def | 12 ++-- .../node.tag/advertise-interval/node.def | 8 +-- .../vrrp-group/node.tag/authentication/node.def | 6 +- .../node.tag/authentication/password/node.def | 2 +- .../node.tag/authentication/type/node.def | 10 ++-- .../vrrp/vrrp-group/node.tag/description/node.def | 2 +- .../vif/node.tag/vrrp/vrrp-group/node.tag/node.def | 2 +- .../vrrp/vrrp-group/node.tag/preempt/node.def | 10 ++-- .../vrrp/vrrp-group/node.tag/priority/node.def | 8 +-- .../vrrp/vrrp-group/node.tag/sync-group/node.def | 2 +- .../vrrp-group/node.tag/virtual-address/node.def | 2 +- .../interfaces/ethernet/node.tag/vrrp/node.def | 6 +- .../ethernet/node.tag/vrrp/vrrp-group/node.def | 12 ++-- .../node.tag/advertise-interval/node.def | 8 +-- .../vrrp-group/node.tag/authentication/node.def | 6 +- .../node.tag/authentication/password/node.def | 2 +- .../node.tag/authentication/type/node.def | 10 ++-- .../vrrp/vrrp-group/node.tag/description/node.def | 2 +- .../node.tag/vrrp/vrrp-group/node.tag/node.def | 2 +- .../vrrp/vrrp-group/node.tag/preempt/node.def | 10 ++-- .../vrrp/vrrp-group/node.tag/priority/node.def | 8 +-- .../vrrp/vrrp-group/node.tag/sync-group/node.def | 2 +- .../vrrp-group/node.tag/virtual-address/node.def | 2 +- templates/interfaces/tunnel/node.def | 18 +++--- .../interfaces/tunnel/node.tag/address/node.def | 12 ++-- .../tunnel/node.tag/description/node.def | 2 +- .../interfaces/tunnel/node.tag/disable/node.def | 6 +- .../tunnel/node.tag/encapsulation/node.def | 14 ++--- templates/interfaces/tunnel/node.tag/key/node.def | 10 ++-- .../interfaces/tunnel/node.tag/local-ip/node.def | 6 +- templates/interfaces/tunnel/node.tag/mtu/node.def | 12 ++-- .../interfaces/tunnel/node.tag/remote-ip/node.def | 2 +- templates/interfaces/tunnel/node.tag/tos/node.def | 12 ++-- templates/interfaces/tunnel/node.tag/ttl/node.def | 12 ++-- templates/protocols/snmp/community/node.def | 2 +- .../snmp/community/node.tag/authorization/node.def | 4 +- .../protocols/snmp/community/node.tag/node.def | 2 +- templates/protocols/snmp/contact/node.def | 2 +- templates/protocols/snmp/description/node.def | 2 +- templates/protocols/snmp/location/node.def | 2 +- templates/protocols/snmp/node.def | 12 ++-- templates/protocols/snmp/trap-target/node.def | 2 +- templates/service/node.def | 2 +- templates/service/ssh/node.def | 14 ++--- templates/service/ssh/port/node.def | 2 +- templates/service/ssh/protocol-version/node.def | 2 +- templates/service/telnet/allow-root/node.def | 8 +-- templates/service/telnet/node.def | 10 ++-- templates/service/telnet/port/node.def | 2 +- templates/system/domain-name/node.def | 8 +-- templates/system/domain-search/domain/node.def | 8 +-- templates/system/domain-search/node.def | 2 +- templates/system/host-name/node.def | 20 +++---- templates/system/login/node.def | 4 +- templates/system/login/radius-server/node.def | 12 ++-- .../login/radius-server/node.tag/port/node.def | 4 +- .../login/radius-server/node.tag/secret/node.def | 2 +- .../login/radius-server/node.tag/timeout/node.def | 2 +- templates/system/login/user/node.def | 22 +++---- .../authentication/encrypted-password/node.def | 2 +- .../login/user/node.tag/authentication/node.def | 2 +- .../authentication/plaintext-password/node.def | 10 ++-- .../system/login/user/node.tag/full-name/node.def | 2 +- .../system/login/user/node.tag/level/node.def | 10 ++-- templates/system/name-server/node.def | 12 ++-- templates/system/node.def | 2 +- templates/system/ntp-server/node.def | 14 ++--- templates/system/options/node.def | 2 +- templates/system/options/reboot-on-panic/node.def | 6 +- templates/system/package/auto-sync/node.def | 10 ++-- templates/system/package/node.def | 2 +- templates/system/package/repository/node.def | 18 +++--- .../repository/node.tag/components/node.def | 4 +- .../repository/node.tag/description/node.def | 2 +- .../repository/node.tag/distribution/node.def | 4 +- .../package/repository/node.tag/url/node.def | 4 +- .../system/static-host-mapping/host-name/node.def | 16 ++--- .../host-name/node.tag/alias/node.def | 2 +- .../host-name/node.tag/inet/node.def | 2 +- templates/system/static-host-mapping/node.def | 2 +- templates/system/syslog/console/facility/node.def | 64 ++++++++++---------- .../console/facility/node.tag/level/node.def | 22 +++---- templates/system/syslog/console/node.def | 2 +- templates/system/syslog/file/node.def | 4 +- .../syslog/file/node.tag/archive/files/node.def | 2 +- .../system/syslog/file/node.tag/archive/node.def | 10 ++-- .../syslog/file/node.tag/archive/size/node.def | 2 +- .../system/syslog/file/node.tag/facility/node.def | 68 +++++++++++----------- .../file/node.tag/facility/node.tag/level/node.def | 22 +++---- .../system/syslog/global/archive/files/node.def | 2 +- templates/system/syslog/global/archive/node.def | 10 ++-- .../system/syslog/global/archive/size/node.def | 2 +- templates/system/syslog/global/facility/node.def | 60 +++++++++---------- .../syslog/global/facility/node.tag/level/node.def | 22 +++---- templates/system/syslog/global/node.def | 2 +- templates/system/syslog/host/node.def | 2 +- .../system/syslog/host/node.tag/facility/node.def | 66 ++++++++++----------- .../host/node.tag/facility/node.tag/level/node.def | 22 +++---- templates/system/syslog/node.def | 4 +- templates/system/syslog/user/node.def | 2 +- .../system/syslog/user/node.tag/facility/node.def | 66 ++++++++++----------- .../user/node.tag/facility/node.tag/level/node.def | 22 +++---- templates/system/time-zone/node.def | 56 +++++++++--------- 123 files changed, 602 insertions(+), 602 deletions(-) (limited to 'templates') diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def index d44c7216..ff643980 100644 --- a/templates/interfaces/bridge/node.def +++ b/templates/interfaces/bridge/node.def @@ -1,7 +1,7 @@ tag: type: txt -help: "Configure a bridge interface" -syntax: $(@) in "br0", "br1", "br2", "br3", "br4", "br5", "br6", "br7", "br8", "br9" ; "Must be (br0 - br9)" -create: "sudo brctl addbr $(@)" -delete: "sudo brctl delbr $(@)" -#comp_help: "Enter bridge interface name (br0 - br9)" +help: Configure a bridge interface +syntax:expression: $VAR(@) in "br0", "br1", "br2", "br3", "br4", "br5", "br6", "br7", "br8", "br9" ; "Must be (br0 - br9)" +create:expression: "sudo brctl addbr $VAR(@)" +delete:expression: "sudo brctl delbr $VAR(@)" +comp_help: "Enter bridge interface name (br0 - br9)" diff --git a/templates/interfaces/bridge/node.tag/address/node.def b/templates/interfaces/bridge/node.tag/address/node.def index af198670..410c072b 100644 --- a/templates/interfaces/bridge/node.tag/address/node.def +++ b/templates/interfaces/bridge/node.tag/address/node.def @@ -1,10 +1,10 @@ multi: type: txt -help: "Configure an IP address for this interface" -syntax: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $(@) --dev $(../@)"; "Invalid IP address/prefix [$(@)] for interface $(../@)" -update: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $(@) --dev $(../@)"; "Error setting address $(@) on interface $(../@)" -delete: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $(@) --dev $(../@)"; "Error deleting address $(@) on interface $(../@)" -#comp_help:Possible completions: -# /\tSet the IP address and prefix length -# dhcp\t\t\t\tSet the IP address and prefix length via DHCP +help: Configure an IP address for this interface +syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)"; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +update:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; "Error setting address $VAR(@) on interface $VAR(../@)" +delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)"; "Error deleting address $VAR(@) on interface $VAR(../@)" +comp_help:Possible completions: + /\tSet the IP address and prefix length + dhcp\t\t\t\tSet the IP address and prefix length via DHCP diff --git a/templates/interfaces/bridge/node.tag/aging/node.def b/templates/interfaces/bridge/node.tag/aging/node.def index 0b1dcd03..3431f28e 100644 --- a/templates/interfaces/bridge/node.tag/aging/node.def +++ b/templates/interfaces/bridge/node.tag/aging/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Set the number of seconds a MAC address will be kept in the forwarding database" +help: Set the number of seconds a MAC address will be kept in the forwarding database default: 300 -update: "sudo brctl setageing $(../@) $(@)" -delete: "sudo brctl setageing $(../@) $(@)" +update:expression: "sudo brctl setageing $VAR(../@) $VAR(@)" +delete:expression: "sudo brctl setageing $VAR(../@) $VAR(@)" diff --git a/templates/interfaces/bridge/node.tag/description/node.def b/templates/interfaces/bridge/node.tag/description/node.def index 481dce47..d01f83a7 100644 --- a/templates/interfaces/bridge/node.tag/description/node.def +++ b/templates/interfaces/bridge/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Add a human-readable description of an interface" +help: Add a human-readable description of an interface diff --git a/templates/interfaces/bridge/node.tag/disable/node.def b/templates/interfaces/bridge/node.tag/disable/node.def index f72b8af3..d9d4883e 100644 --- a/templates/interfaces/bridge/node.tag/disable/node.def +++ b/templates/interfaces/bridge/node.tag/disable/node.def @@ -1,8 +1,8 @@ type: bool -help: "Disable the bridge interface" +help: Disable the bridge interface default: false -update: "if [ x$(@) == xtrue ]; then \ - sudo ip link set $(../@) down; \ +update:expression: "if [ x$VAR(@) == xtrue ]; then \ + sudo ip link set $VAR(../@) down; \ else \ - sudo ip link set $(../@) up; \ + sudo ip link set $VAR(../@) up; \ fi; " diff --git a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def index 6634a7cc..3bf3cdda 100644 --- a/templates/interfaces/bridge/node.tag/forwarding-delay/node.def +++ b/templates/interfaces/bridge/node.tag/forwarding-delay/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Set the forwarding delay" +help: Set the forwarding delay default: 15 -update: "sudo brctl setfd $(../@) $(@)" -delete: "sudo brctl setfd $(../@) $(@)" +update:expression: "sudo brctl setfd $VAR(../@) $VAR(@)" +delete:expression: "sudo brctl setfd $VAR(../@) $VAR(@)" diff --git a/templates/interfaces/bridge/node.tag/hello-time/node.def b/templates/interfaces/bridge/node.tag/hello-time/node.def index e7b59ab3..8128a16d 100644 --- a/templates/interfaces/bridge/node.tag/hello-time/node.def +++ b/templates/interfaces/bridge/node.tag/hello-time/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Set the hello packet advertisment interval" +help: Set the hello packet advertisment interval default: 2 -update: "sudo brctl sethello $(../@) $(@)" -delete: "sudo brctl sethello $(../@) $(@)" +update:expression: "sudo brctl sethello $VAR(../@) $VAR(@)" +delete:expression: "sudo brctl sethello $VAR(../@) $VAR(@)" diff --git a/templates/interfaces/bridge/node.tag/max-age/node.def b/templates/interfaces/bridge/node.tag/max-age/node.def index 7fa3ecbe..1c245ed5 100644 --- a/templates/interfaces/bridge/node.tag/max-age/node.def +++ b/templates/interfaces/bridge/node.tag/max-age/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Set the interval at which neighbor bridges are removed" +help: Set the interval at which neighbor bridges are removed default: 20 -update: "sudo brctl setmaxage $(../@) $(@)" -delete: "sudo brctl setmaxage $(../@) $(@)" +update:expression: "sudo brctl setmaxage $VAR(../@) $VAR(@)" +delete:expression: "sudo brctl setmaxage $VAR(../@) $VAR(@)" diff --git a/templates/interfaces/bridge/node.tag/node.def b/templates/interfaces/bridge/node.tag/node.def index 07e13e91..b265ba49 100644 --- a/templates/interfaces/bridge/node.tag/node.def +++ b/templates/interfaces/bridge/node.tag/node.def @@ -1 +1 @@ -help: "Set bridge parameters" +help: Set bridge parameters diff --git a/templates/interfaces/bridge/node.tag/priority/node.def b/templates/interfaces/bridge/node.tag/priority/node.def index 650958ef..f2876989 100644 --- a/templates/interfaces/bridge/node.tag/priority/node.def +++ b/templates/interfaces/bridge/node.tag/priority/node.def @@ -1,5 +1,5 @@ type: u32 -help: "Set the priority for this bridge" +help: Set the priority for this bridge default: 0 -update: "sudo brctl setbridgeprio $(../@) $(@)" -delete: "sudo brctl setbridgeprio $(../@) $(@)" +update:expression: "sudo brctl setbridgeprio $VAR(../@) $VAR(@)" +delete:expression: "sudo brctl setbridgeprio $VAR(../@) $VAR(@)" diff --git a/templates/interfaces/bridge/node.tag/stp/node.def b/templates/interfaces/bridge/node.tag/stp/node.def index eb87287b..88f6c32b 100644 --- a/templates/interfaces/bridge/node.tag/stp/node.def +++ b/templates/interfaces/bridge/node.tag/stp/node.def @@ -1,9 +1,9 @@ type: bool -help: "Enable spanning tree protocol" +help: Enable spanning tree protocol default: false -update: "if [ x$(@) == xtrue ]; then \ - sudo brctl stp $(../@) on; \ +update:expression: "if [ x$VAR(@) == xtrue ]; then \ + sudo brctl stp $VAR(../@) on; \ else \ - sudo brctl stp $(../@) off; \ + sudo brctl stp $VAR(../@) off; \ fi; " -delete: "sudo brctl stp $(../@) off" +delete:expression: "sudo brctl stp $VAR(../@) off" diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def index f6ca51e4..9a071930 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def @@ -1,12 +1,12 @@ type: txt -help: "Add this interface to a bridge-group" -syntax: exec " \ - if [ -z \"`sudo brctl show | grep $(@) `\" ]; then \ - echo bridge interface $(@) doesn\\'t exist on this system ; \ +help: Add this interface to a bridge-group +syntax:expression: exec " \ + if [ -z \"`sudo brctl show | grep $VAR(@) `\" ]; then \ + echo bridge interface $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -update: "sudo brctl addif $(@) $(../../@)" -delete: "sudo brctl delif $(@) $(../../@)" -#allowed: local -a array ; -# array=( /sys/class/net/br* ) ; -# echo -n ${array[@]##*/} +update:expression: "sudo brctl addif $VAR(@) $VAR(../../@)" +delete:expression: "sudo brctl delif $VAR(@) $VAR(../../@)" +allowed: local -a array ; + array=( /sys/class/net/br* ) ; + echo -n ${array[@]##*/} diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def index 1c2bbde1..f3ae520f 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def @@ -1,4 +1,4 @@ type: u32 -help: "Set the path cost for this port" -commit: $(../bridge/) != ""; "Must configure bridge interface" -update: "sudo brctl setpathcost $(../../@) $(@)" +help: Set the path cost for this port +commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface" +update:expression: "sudo brctl setpathcost $VAR(../../@) $VAR(@)" diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def index b76b5d71..fd392431 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def @@ -1,2 +1,2 @@ -help: "Add this interface to a bridge group" -commit: $(./bridge/) != ""; "Must set the bridge interface" +help: Add this interface to a bridge group +commit:expression: $VAR(./bridge/) != ""; "Must set the bridge interface" diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def index d254b082..12200b72 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def @@ -1,4 +1,4 @@ type: u32 -help: "Set the path priority for this port" -commit: $(../bridge/) != ""; "Must configure bridge interface" -update: "sudo brctl setportprio $(../../@) $(@)" +help: Set the path priority for this port +commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface" +update:expression: "sudo brctl setportprio $VAR(../../@) $VAR(@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def index d655f6bc..fffa0eeb 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/bridge/node.def @@ -1,12 +1,12 @@ type: txt -help: "Add this interface to a bridge-group" -syntax: exec " \ - if [ -z \"`sudo brctl show | grep $(@) `\" ]; then \ - echo bridge interface $(@) doesn\\'t exist on this system ; \ +help: Add this interface to a bridge-group +syntax:expression: exec " \ + if [ -z \"`sudo brctl show | grep $VAR(@) `\" ]; then \ + echo bridge interface $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -update: "sudo brctl addif $(@) $(../../../../@).$(../../@)" -delete: "sudo brctl delif $(@) $(../../../../@).$(../../@)" -#allowed: local -a array ; -# array=( /sys/class/net/br* ) ; -# echo -n ${array[@]##*/} +update:expression: "sudo brctl addif $VAR(@) $VAR(../../../../@).$VAR(../../@)" +delete:expression: "sudo brctl delif $VAR(@) $VAR(../../../../@).$VAR(../../@)" +allowed: local -a array ; + array=( /sys/class/net/br* ) ; + echo -n ${array[@]##*/} diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def index 1c2bbde1..f3ae520f 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/cost/node.def @@ -1,4 +1,4 @@ type: u32 -help: "Set the path cost for this port" -commit: $(../bridge/) != ""; "Must configure bridge interface" -update: "sudo brctl setpathcost $(../../@) $(@)" +help: Set the path cost for this port +commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface" +update:expression: "sudo brctl setpathcost $VAR(../../@) $VAR(@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def index b76b5d71..fd392431 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/node.def @@ -1,2 +1,2 @@ -help: "Add this interface to a bridge group" -commit: $(./bridge/) != ""; "Must set the bridge interface" +help: Add this interface to a bridge group +commit:expression: $VAR(./bridge/) != ""; "Must set the bridge interface" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def index d254b082..12200b72 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/bridge-group/priority/node.def @@ -1,4 +1,4 @@ type: u32 -help: "Set the path priority for this port" -commit: $(../bridge/) != ""; "Must configure bridge interface" -update: "sudo brctl setportprio $(../../@) $(@)" +help: Set the path priority for this port +commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface" +update:expression: "sudo brctl setportprio $VAR(../../@) $VAR(@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/node.def index b21963c6..e4892540 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/node.def @@ -1,3 +1,3 @@ -help: "Configure VRRP" -commit: $(../address/) != ""; "Must define a primary IP address on $(../../@) vif $(../@)" -end: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action update --intf $(../../@).$(../@) " +help: Configure VRRP +commit:expression: $VAR(../address/) != ""; "Must define a primary IP address on $VAR(../../@) vif $VAR(../@)" +end:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action update --intf $VAR(../../@).$VAR(../@) " diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def index e3e0b083..d59bf682 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.def @@ -1,8 +1,8 @@ tag: type: u32 -syntax: $(@) >= 0 && $(@) <= 255; "VRRP group must be between 1-255" -commit: $(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $(@)" -help: "Configure VRRP group number" -delete: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $(../../../@).$(../../@) --group $(@) " -#comp_help: possible completions -# <1-255> VRRP group number +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "VRRP group must be between 1-255" +commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)" +help: Configure VRRP group number +delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../../@).$VAR(../../@) --group $VAR(@) " +comp_help: possible completions + <1-255> VRRP group number diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def index 12c9f0f4..f033aa5d 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def @@ -1,6 +1,6 @@ type: u32 default: 1 -help: "Configure advertise interval" -syntax: $(@) >= 1 && $(@) <=255; "Advertise interval must be between 1-255" -#comp_help: possible completions -# <1-255> Set advertise interval (default 1) +help: Configure advertise interval +syntax:expression: $VAR(@) >= 1 && $VAR(@) <=255; "Advertise interval must be between 1-255" +comp_help: possible completions + <1-255> Set advertise interval (default 1) diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def index e3120d51..8e924a0e 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def @@ -1,3 +1,3 @@ -help: "Configure authentication" -commit: $(./type/@) != ""; "You must set a authentication type" -commit: $(./password/@) != ""; "You must set a authentication password" +help: Configure authentication +commit:expression: $VAR(./type/@) != ""; "You must set a authentication type" +commit:expression: $VAR(./password/@) != ""; "You must set a authentication password" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def index 87855962..412d8274 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def @@ -1,2 +1,2 @@ type: txt -help: "Password text" +help: Password text diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def index 9f624356..33fbdae9 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def @@ -1,6 +1,6 @@ type: txt -help: "Authentication type" -syntax: $(@) in "simple", "AH", "ah"; "authentication must be simple or AH" -#comp_help: possible completions: -# simple Set simple password mode -# AH Set IP Authentication Header mode +help: Authentication type +syntax:expression: $VAR(@) in "simple", "AH", "ah"; "authentication must be simple or AH" +comp_help: possible completions: + simple Set simple password mode + AH Set IP Authentication Header mode diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def index d457185a..835ad401 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Description for this interface" +help: Description for this interface diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/node.def index a4f3c074..95761590 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/node.def @@ -1 +1 @@ -help: "VRRP configuration for this VRRP group" +help: VRRP configuration for this VRRP group diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def index a0b0efa2..c3dc66cd 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def @@ -1,7 +1,7 @@ type: txt -help: "Preempt mode" +help: Preempt mode default: "true" -syntax: $(@) in "true", "false"; "preempt must be true or false" -#comp_help: possible completions: -# true (default) -# false +syntax:expression: $VAR(@) in "true", "false"; "preempt must be true or false" +comp_help: possible completions: + true (default) + false diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def index 413bba15..504eebc4 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/priority/node.def @@ -1,5 +1,5 @@ type: u32 -syntax: $(@) >= 0 &&$(@) <= 255; "priority must be between 1-255" -help: "Priority" -#comp_help: possible completions: -# <1-255> Set Priority +syntax:expression: $VAR(@) >= 0 &&$VAR(@) <= 255; "priority must be between 1-255" +help: Priority +comp_help: possible completions: + <1-255> Set Priority diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def index 5fa24b92..a7d2e1fd 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def @@ -1,2 +1,2 @@ type: txt -help: "Add this vrrp group to a sync group" +help: Add this vrrp group to a sync group diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index bcf9392f..516d6add 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -1,3 +1,3 @@ multi: type: ipv4 -help: "Configure virtual address" +help: Configure virtual address diff --git a/templates/interfaces/ethernet/node.tag/vrrp/node.def b/templates/interfaces/ethernet/node.tag/vrrp/node.def index 2c8cc58a..05cfb986 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/node.def @@ -1,3 +1,3 @@ -help: "Configure VRRP" -commit: $(../address/) != ""; "Must define a primary IP address on $(../@)" -end: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action update --intf $(../@) " +help: Configure VRRP +commit:expression: $VAR(../address/) != ""; "Must define a primary IP address on $VAR(../@)" +end:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action update --intf $VAR(../@) " diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def index a61a022f..90bf0d5c 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.def @@ -1,8 +1,8 @@ tag: type: u32 -syntax: $(@) >= 0 && $(@) <= 255; "VRRP group must be between 1-255" -commit: $(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $(@)" -help: "Configure VRRP group number" -delete: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $(../../@) --group $(@) " -#comp_help: possible completions -# <1-255> VRRP group number +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "VRRP group must be between 1-255" +commit:expression: $VAR(virtual-address/) != ""; "Must define the virtual-address for vrrp-group $VAR(@)" +help: Configure VRRP group number +delete:expression: "sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action delete --intf $VAR(../../@) --group $VAR(@) " +comp_help: possible completions + <1-255> VRRP group number diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def index 12c9f0f4..f033aa5d 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/advertise-interval/node.def @@ -1,6 +1,6 @@ type: u32 default: 1 -help: "Configure advertise interval" -syntax: $(@) >= 1 && $(@) <=255; "Advertise interval must be between 1-255" -#comp_help: possible completions -# <1-255> Set advertise interval (default 1) +help: Configure advertise interval +syntax:expression: $VAR(@) >= 1 && $VAR(@) <=255; "Advertise interval must be between 1-255" +comp_help: possible completions + <1-255> Set advertise interval (default 1) diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def index e3120d51..8e924a0e 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/node.def @@ -1,3 +1,3 @@ -help: "Configure authentication" -commit: $(./type/@) != ""; "You must set a authentication type" -commit: $(./password/@) != ""; "You must set a authentication password" +help: Configure authentication +commit:expression: $VAR(./type/@) != ""; "You must set a authentication type" +commit:expression: $VAR(./password/@) != ""; "You must set a authentication password" diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def index 87855962..412d8274 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/password/node.def @@ -1,2 +1,2 @@ type: txt -help: "Password text" +help: Password text diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def index 9f624356..33fbdae9 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def @@ -1,6 +1,6 @@ type: txt -help: "Authentication type" -syntax: $(@) in "simple", "AH", "ah"; "authentication must be simple or AH" -#comp_help: possible completions: -# simple Set simple password mode -# AH Set IP Authentication Header mode +help: Authentication type +syntax:expression: $VAR(@) in "simple", "AH", "ah"; "authentication must be simple or AH" +comp_help: possible completions: + simple Set simple password mode + AH Set IP Authentication Header mode diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/description/node.def index d457185a..835ad401 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/description/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Description for this interface" +help: Description for this interface diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/node.def index a4f3c074..95761590 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/node.def @@ -1 +1 @@ -help: "VRRP configuration for this VRRP group" +help: VRRP configuration for this VRRP group diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def index a0b0efa2..c3dc66cd 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/preempt/node.def @@ -1,7 +1,7 @@ type: txt -help: "Preempt mode" +help: Preempt mode default: "true" -syntax: $(@) in "true", "false"; "preempt must be true or false" -#comp_help: possible completions: -# true (default) -# false +syntax:expression: $VAR(@) in "true", "false"; "preempt must be true or false" +comp_help: possible completions: + true (default) + false diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/priority/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/priority/node.def index 413bba15..504eebc4 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/priority/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/priority/node.def @@ -1,5 +1,5 @@ type: u32 -syntax: $(@) >= 0 &&$(@) <= 255; "priority must be between 1-255" -help: "Priority" -#comp_help: possible completions: -# <1-255> Set Priority +syntax:expression: $VAR(@) >= 0 &&$VAR(@) <= 255; "priority must be between 1-255" +help: Priority +comp_help: possible completions: + <1-255> Set Priority diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def index 5fa24b92..a7d2e1fd 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/sync-group/node.def @@ -1,2 +1,2 @@ type: txt -help: "Add this vrrp group to a sync group" +help: Add this vrrp group to a sync group diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index bcf9392f..516d6add 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -1,3 +1,3 @@ multi: type: ipv4 -help: "Configure virtual address" +help: Configure virtual address diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 8d8cc029..73c8e572 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -1,11 +1,11 @@ tag: type: txt -help: "Configure a tunnel interface" -syntax: $(@) in "tun0", "tun1", "tun2", "tun3", "tun4", "tun5", "tun6", "tun7", "tun8", "tun9" ; "Must be (tun0 - tun9)" -commit: $(./local-ip/) != "" ; "Must configure the tunnel local-ip" -commit: $(./remote-ip/) != "" ; "Must configure the tunnel remote-ip" -commit: $(./encapsulation/) != "" ; "Must configure the tunnel encapsulation" -create: "sudo ip tunnel add $(@) local $(./local-ip/@) remote $(./remote-ip/@) mode $(./encapsulation/@)" -create: "sudo ip link set $(@) up" -delete: "sudo ip tunnel del $(@)" -#comp_help: "Enter tunnel interface name (tun0 - tun9)" +help: Configure a tunnel interface +syntax:expression: $VAR(@) in "tun0", "tun1", "tun2", "tun3", "tun4", "tun5", "tun6", "tun7", "tun8", "tun9" ; "Must be (tun0 - tun9)" +commit:expression: $VAR(./local-ip/) != "" ; "Must configure the tunnel local-ip" +commit:expression: $VAR(./remote-ip/) != "" ; "Must configure the tunnel remote-ip" +commit:expression: $VAR(./encapsulation/) != "" ; "Must configure the tunnel encapsulation" +create:expression: "sudo ip tunnel add $VAR(@) local $VAR(./local-ip/@) remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@)" +create:expression: "sudo ip link set $VAR(@) up" +delete:expression: "sudo ip tunnel del $VAR(@)" +comp_help: "Enter tunnel interface name (tun0 - tun9)" diff --git a/templates/interfaces/tunnel/node.tag/address/node.def b/templates/interfaces/tunnel/node.tag/address/node.def index 06605f45..fe58ae05 100644 --- a/templates/interfaces/tunnel/node.tag/address/node.def +++ b/templates/interfaces/tunnel/node.tag/address/node.def @@ -1,8 +1,8 @@ multi: type: txt -help: "Configure an IP address for this interface" -syntax: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $(@) --dev $(../@)"; "Invalid IP address/prefix [$(@)] for interface $(../@)" -update: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $(@) --dev $(../@)"; "Error setting address $(@) on interface $(../@)" -delete: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $(@) --dev $(../@)"; "Error deleting address $(@) on interface $(../@)" -#comp_help:Possible completions: -# /\tSet the IP address and prefix length +help: Configure an IP address for this interface +syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)"; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +update:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; "Error setting address $VAR(@) on interface $VAR(../@)" +delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)"; "Error deleting address $VAR(@) on interface $VAR(../@)" +comp_help:Possible completions: + /\tSet the IP address and prefix length diff --git a/templates/interfaces/tunnel/node.tag/description/node.def b/templates/interfaces/tunnel/node.tag/description/node.def index e443734d..e00ed857 100644 --- a/templates/interfaces/tunnel/node.tag/description/node.def +++ b/templates/interfaces/tunnel/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Description of this tunnel interface" +help: Description of this tunnel interface diff --git a/templates/interfaces/tunnel/node.tag/disable/node.def b/templates/interfaces/tunnel/node.tag/disable/node.def index 56199085..9c795c61 100644 --- a/templates/interfaces/tunnel/node.tag/disable/node.def +++ b/templates/interfaces/tunnel/node.tag/disable/node.def @@ -1,3 +1,3 @@ -help: "Disable interface" -update: "sudo ip link set $(../@) down"; "Error disabling dev $(../@)" -delete: "sudo ip link set $(../@) up"; "Error enabling dev $(../@)" +help: Disable interface +update:expression: "sudo ip link set $VAR(../@) down"; "Error disabling dev $VAR(../@)" +delete:expression: "sudo ip link set $VAR(../@) up"; "Error enabling dev $VAR(../@)" diff --git a/templates/interfaces/tunnel/node.tag/encapsulation/node.def b/templates/interfaces/tunnel/node.tag/encapsulation/node.def index 9b495228..98745b2d 100644 --- a/templates/interfaces/tunnel/node.tag/encapsulation/node.def +++ b/templates/interfaces/tunnel/node.tag/encapsulation/node.def @@ -1,8 +1,8 @@ type: txt -help: "Set the encapsulation of this tunnel interface" -syntax: $(@) in "ipip", "gre", "sit"; "Must be (ipip, gre, sit)" -update: "sudo ip tunnel change $(../@) mode $(@)" -#comp_help: "possible completions: -# gre Set Generic Routing Encapsulation -# ipip Set IP in IP encapsulation -# sit Set Simple Internet Transition encapsulation +help: Set the encapsulation of this tunnel interface +syntax:expression: $VAR(@) in "ipip", "gre", "sit"; "Must be (ipip, gre, sit)" +update:expression: "sudo ip tunnel change $VAR(../@) mode $VAR(@)" +comp_help: "possible completions: + gre Set Generic Routing Encapsulation + ipip Set IP in IP encapsulation + sit Set Simple Internet Transition encapsulation diff --git a/templates/interfaces/tunnel/node.tag/key/node.def b/templates/interfaces/tunnel/node.tag/key/node.def index 691b1cbd..1c524984 100644 --- a/templates/interfaces/tunnel/node.tag/key/node.def +++ b/templates/interfaces/tunnel/node.tag/key/node.def @@ -1,6 +1,6 @@ type: u32 -help: "Set the tunnel key" -syntax: $(@) >= 0 && $(@) <= 999999; "Must be between 0-999999" -update: "sudo ip tunnel change $(../@) key $(@)" -#comp_help: possible completions -# <0-999999> Set a tunnel key +help: Set the tunnel key +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 999999; "Must be between 0-999999" +update:expression: "sudo ip tunnel change $VAR(../@) key $VAR(@)" +comp_help: possible completions + <0-999999> Set a tunnel key diff --git a/templates/interfaces/tunnel/node.tag/local-ip/node.def b/templates/interfaces/tunnel/node.tag/local-ip/node.def index 3276c636..6cdaf2a5 100644 --- a/templates/interfaces/tunnel/node.tag/local-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/local-ip/node.def @@ -1,6 +1,6 @@ type: ipv4 -help: "Enter the local IP address for this tunnel" -syntax: exec "if [ -z \"`ip addr list | grep $(@) `\" ]; then \ - echo IP address $(@) doesn\\'t exist on this system ; \ +help: Enter the local IP address for this tunnel +syntax:expression: exec "if [ -z \"`ip addr list | grep $VAR(@) `\" ]; then \ + echo IP address $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " diff --git a/templates/interfaces/tunnel/node.tag/mtu/node.def b/templates/interfaces/tunnel/node.tag/mtu/node.def index ffdcc735..47dc34cf 100644 --- a/templates/interfaces/tunnel/node.tag/mtu/node.def +++ b/templates/interfaces/tunnel/node.tag/mtu/node.def @@ -1,7 +1,7 @@ type: u32 -help: "Set the tunnel MTU" -syntax: $(@) >= 64 && $(@) <= 8024; "Must be between 64-8024" -update: "sudo ip link set $(../@) mtu $(@)" -delete: "sudo ip link set $(../@) mtu 1476" -#comp_help: possible completions: -# <64-8024> Set MTU +help: Set the tunnel MTU +syntax:expression: $VAR(@) >= 64 && $VAR(@) <= 8024; "Must be between 64-8024" +update:expression: "sudo ip link set $VAR(../@) mtu $VAR(@)" +delete:expression: "sudo ip link set $VAR(../@) mtu 1476" +comp_help: possible completions: + <64-8024> Set MTU diff --git a/templates/interfaces/tunnel/node.tag/remote-ip/node.def b/templates/interfaces/tunnel/node.tag/remote-ip/node.def index b8713e46..e5ee1ffd 100644 --- a/templates/interfaces/tunnel/node.tag/remote-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/remote-ip/node.def @@ -1,2 +1,2 @@ type: ipv4 -help: "Enter the remote IP address for this tunnel" +help: Enter the remote IP address for this tunnel diff --git a/templates/interfaces/tunnel/node.tag/tos/node.def b/templates/interfaces/tunnel/node.tag/tos/node.def index 56a6c9e2..8cc69360 100644 --- a/templates/interfaces/tunnel/node.tag/tos/node.def +++ b/templates/interfaces/tunnel/node.tag/tos/node.def @@ -1,7 +1,7 @@ type: u32 -help: "Set the tunnel type of service" -syntax: $(@) >= 0 && $(@) <= 99; "Must be between 0-99" -update: "sudo ip tunnel change $(../@) tos $(@)" -delete: "sudo ip tunnel change $(../@) tos inherit" -#comp_help: possible completions -# <0-99> Set type of service +help: Set the tunnel type of service +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 99; "Must be between 0-99" +update:expression: "sudo ip tunnel change $VAR(../@) tos $VAR(@)" +delete:expression: "sudo ip tunnel change $VAR(../@) tos inherit" +comp_help: possible completions + <0-99> Set type of service diff --git a/templates/interfaces/tunnel/node.tag/ttl/node.def b/templates/interfaces/tunnel/node.tag/ttl/node.def index 7bdfdeaa..1d194508 100644 --- a/templates/interfaces/tunnel/node.tag/ttl/node.def +++ b/templates/interfaces/tunnel/node.tag/ttl/node.def @@ -1,8 +1,8 @@ type: u32 -help: "Set the tunnel time to live" +help: Set the tunnel time to live default: 255 -syntax: $(@) >= 0 && $(@) <= 255; "Must be between 0-255" -update: "sudo ip tunnel change $(../@) ttl $(@)" -delete: "sudo ip tunnel change $(../@) ttl inherit" -#comp_help: possible completions: -# <0-255> Set time to live (default 255) +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "Must be between 0-255" +update:expression: "sudo ip tunnel change $VAR(../@) ttl $VAR(@)" +delete:expression: "sudo ip tunnel change $VAR(../@) ttl inherit" +comp_help: possible completions: + <0-255> Set time to live (default 255) diff --git a/templates/protocols/snmp/community/node.def b/templates/protocols/snmp/community/node.def index 18472af8..07bedcd1 100644 --- a/templates/protocols/snmp/community/node.def +++ b/templates/protocols/snmp/community/node.def @@ -1,3 +1,3 @@ tag: type: txt -help: "Community name" +help: Community name diff --git a/templates/protocols/snmp/community/node.tag/authorization/node.def b/templates/protocols/snmp/community/node.tag/authorization/node.def index fee6aa42..005e9b39 100644 --- a/templates/protocols/snmp/community/node.tag/authorization/node.def +++ b/templates/protocols/snmp/community/node.tag/authorization/node.def @@ -1,7 +1,7 @@ type: txt default: "ro" -help: "Authorization type (rw or ro)" -syntax: $(@) in "ro", "rw"; "Authorization type must be either rw or ro" +help: Authorization type (rw or ro) +syntax:expression: $VAR(@) in "ro", "rw"; "Authorization type must be either rw or ro" diff --git a/templates/protocols/snmp/community/node.tag/node.def b/templates/protocols/snmp/community/node.tag/node.def index 410186c6..20430928 100644 --- a/templates/protocols/snmp/community/node.tag/node.def +++ b/templates/protocols/snmp/community/node.tag/node.def @@ -1 +1 @@ -help: "Community options" +help: Community options diff --git a/templates/protocols/snmp/contact/node.def b/templates/protocols/snmp/contact/node.def index 970ed5fa..039cd548 100644 --- a/templates/protocols/snmp/contact/node.def +++ b/templates/protocols/snmp/contact/node.def @@ -1,2 +1,2 @@ type: txt -help: "Contact information" +help: Contact information diff --git a/templates/protocols/snmp/description/node.def b/templates/protocols/snmp/description/node.def index d5566f58..61ec96b6 100644 --- a/templates/protocols/snmp/description/node.def +++ b/templates/protocols/snmp/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Description information" +help: Description information diff --git a/templates/protocols/snmp/location/node.def b/templates/protocols/snmp/location/node.def index 284e38a7..a5b234ea 100644 --- a/templates/protocols/snmp/location/node.def +++ b/templates/protocols/snmp/location/node.def @@ -1,3 +1,3 @@ type: txt -help: "Location information" +help: Location information diff --git a/templates/protocols/snmp/node.def b/templates/protocols/snmp/node.def index b140f7f6..62adc534 100644 --- a/templates/protocols/snmp/node.def +++ b/templates/protocols/snmp/node.def @@ -1,10 +1,10 @@ -help: "Configure SNMP" -commit: $(community/) != ""; "must configure a community" -create: "/opt/vyatta/sbin/vyatta-snmp.pl --init-snmp" -delete: "touch /tmp/snmp.\\$PPID" -end: "if [ -f \"/tmp/snmp.\\$PPID\" ]; then \ +help: Configure SNMP +commit:expression: $VAR(community/) != ""; "must configure a community" +create:expression: "/opt/vyatta/sbin/vyatta-snmp.pl --init-snmp" +delete:expression: "touch /tmp/snmp.$PPID" +end:expression: "if [ -f \"/tmp/snmp.$PPID\" ]; then \ sudo /opt/vyatta/sbin/vyatta-snmp.pl --stop-snmp \ - rm /tmp/snmp.\\$PPID; \ + rm /tmp/snmp.$PPID; \ else \ sudo /opt/vyatta/sbin/vyatta-snmp.pl --update-snmp; \ fi; " diff --git a/templates/protocols/snmp/trap-target/node.def b/templates/protocols/snmp/trap-target/node.def index 1a7d5bae..bfb450fd 100644 --- a/templates/protocols/snmp/trap-target/node.def +++ b/templates/protocols/snmp/trap-target/node.def @@ -1,3 +1,3 @@ multi: type: ipv4 -help: "IPv4 address of trap target" +help: IPv4 address of trap target diff --git a/templates/service/node.def b/templates/service/node.def index 11eb1b83..f2dbf0c6 100644 --- a/templates/service/node.def +++ b/templates/service/node.def @@ -1 +1 @@ -help: "Service configuration" +help: Service configuration diff --git a/templates/service/ssh/node.def b/templates/service/ssh/node.def index 17e9b3dd..a16f5d15 100644 --- a/templates/service/ssh/node.def +++ b/templates/service/ssh/node.def @@ -1,17 +1,17 @@ -help: "Enable/disable SSH protocol" -delete: "sudo /usr/sbin/invoke-rc.d ssh stop && \ +help: Enable/disable SSH protocol +delete:expression: "sudo /usr/sbin/invoke-rc.d ssh stop && \ sudo sh -c \"echo 'SSHD_OPTS=' > /etc/default/ssh\" " -end: "if [ -z \"$(port/@)\" ]; then exit 0; fi; \ +end:expression: "if [ -z \"$VAR(port/@)\" ]; then exit 0; fi; \ sudo sh -c \ \"[ -f /etc/ssh/ssh_host_key ] \ || sudo ssh-keygen -t rsa1 -N '' -f /etc/ssh/ssh_host_key\"; \ - case \"$(protocol-version/@)\" in \ + case \"$VAR(protocol-version/@)\" in \ v2) VER=2;; \ v1) VER=1;; \ all) VER=\"1,2\";; \ *) VER=2;; \ esac; \ - STR=\"SSHD_OPTS=\\\"-p $(port/@) -o HostKey=/etc/ssh/ssh_host_key \ --o Protocol=\\\${VER}\\\"\"; \ - sudo sh -c \"echo '\\\$STR' > /etc/default/ssh\"; \ + STR=\"SSHD_OPTS=\\\"-p $VAR(port/@) -o HostKey=/etc/ssh/ssh_host_key \ +-o Protocol=${VER}\\\"\"; \ + sudo sh -c \"echo '$STR' > /etc/default/ssh\"; \ sudo /usr/sbin/invoke-rc.d ssh restart" diff --git a/templates/service/ssh/port/node.def b/templates/service/ssh/port/node.def index ae388cc9..1b1248f4 100644 --- a/templates/service/ssh/port/node.def +++ b/templates/service/ssh/port/node.def @@ -1,3 +1,3 @@ type: u32 default: 22 -help: "Port for SSH service" +help: Port for SSH service diff --git a/templates/service/ssh/protocol-version/node.def b/templates/service/ssh/protocol-version/node.def index ccf98c74..a4efc602 100644 --- a/templates/service/ssh/protocol-version/node.def +++ b/templates/service/ssh/protocol-version/node.def @@ -1,3 +1,3 @@ type: txt default: "v2" -help: "SSH version" +help: SSH version diff --git a/templates/service/telnet/allow-root/node.def b/templates/service/telnet/allow-root/node.def index 9c3ff97d..d1a25f4e 100644 --- a/templates/service/telnet/allow-root/node.def +++ b/templates/service/telnet/allow-root/node.def @@ -1,19 +1,19 @@ type: bool default: false -help: "Enable/disable root login" -update: " \ +help: Enable/disable root login +update:expression: " \ if ! env | grep -q SSH_TTY=; then \ if [[ \"`tty`\" == /dev/pts/* ]]; then \ echo \"Please configure telnet settings via ssh or console.\"; \ exit 1; \ fi; \ fi; \ - if [ \"$(@)\" == \"true\" ]; then \ + if [ \"$VAR(@)\" == \"true\" ]; then \ sudo mv -f /etc/securetty /etc/securetty.allow-root >&/dev/null; \ else sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null; \ fi ; /bin/true" -delete: " \ +delete:expression: " \ if ! env | grep -q SSH_TTY=; then \ if [[ \"`tty`\" == /dev/pts/* ]]; then \ echo \"Please configure telnet settings via ssh or console.\"; \ diff --git a/templates/service/telnet/node.def b/templates/service/telnet/node.def index 844aec98..a1cc9680 100644 --- a/templates/service/telnet/node.def +++ b/templates/service/telnet/node.def @@ -1,5 +1,5 @@ -help: "Enable/disable telnet protocol" -delete: " \ +help: Enable/disable telnet protocol +delete:expression: " \ if ! env | grep -q SSH_TTY=; then \ if [[ \"`tty`\" == /dev/pts/* ]]; then \ echo \"Please configure telnet settings via ssh or console.\"; \ @@ -7,12 +7,12 @@ delete: " \ fi; \ fi; \ sudo /opt/vyatta/sbin/telnetd.init stop" -end: " \ +end:expression: " \ if ! env | grep -q SSH_TTY=; then \ if [[ \"`tty`\" == /dev/pts/* ]]; then \ echo \"Please configure telnet settings via ssh or console.\"; \ exit 1; \ fi; \ fi; \ - if [ -z \"$(port/@)\" ]; then exit 0; fi; \ - sudo /opt/vyatta/sbin/telnetd.init restart $(port/@)" + if [ -z \"$VAR(port/@)\" ]; then exit 0; fi; \ + sudo /opt/vyatta/sbin/telnetd.init restart $VAR(port/@)" diff --git a/templates/service/telnet/port/node.def b/templates/service/telnet/port/node.def index d9bbce6c..81b2ff91 100644 --- a/templates/service/telnet/port/node.def +++ b/templates/service/telnet/port/node.def @@ -1,3 +1,3 @@ type: u32 default: 23 -help: "Port for telnet service" +help: Port for telnet service diff --git a/templates/system/domain-name/node.def b/templates/system/domain-name/node.def index 4e3902dc..9101f2f3 100644 --- a/templates/system/domain-name/node.def +++ b/templates/system/domain-name/node.def @@ -1,9 +1,9 @@ type: txt -help: "Configure system domain name" -syntax: pattern $(@) "^[-a-zA-Z0-9.]{0,63}$" ; "invalid domain name $(@)" +help: Configure system domain name +syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]{0,63}$" ; "invalid domain name $VAR(@)" # also add localhost line into /etc/hosts (see host-name template)? -update: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" +update:expression: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" # also update localhost line in /etc/hosts (see host-name template)? -delete: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" +delete:expression: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" diff --git a/templates/system/domain-search/domain/node.def b/templates/system/domain-search/domain/node.def index e29df293..bd3e51bf 100644 --- a/templates/system/domain-search/domain/node.def +++ b/templates/system/domain-search/domain/node.def @@ -1,6 +1,6 @@ multi: type: txt -help: "Configure DNS domain completion order" -syntax: pattern $(@) "^[-a-zA-Z0-9.]+$" ; "invalid domain name $(@)" -update: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" -delete: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" +help: Configure DNS domain completion order +syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "invalid domain name $VAR(@)" +update:expression: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" +delete:expression: "sudo /opt/vyatta/sbin/vyatta_update_resolv.pl" diff --git a/templates/system/domain-search/node.def b/templates/system/domain-search/node.def index bbaf2170..ce28442d 100644 --- a/templates/system/domain-search/node.def +++ b/templates/system/domain-search/node.def @@ -1 +1 @@ -help: "Configure DNS domain completion order" +help: Configure DNS domain completion order diff --git a/templates/system/host-name/node.def b/templates/system/host-name/node.def index e1370b70..e7e3d20b 100644 --- a/templates/system/host-name/node.def +++ b/templates/system/host-name/node.def @@ -1,19 +1,19 @@ type: txt -help: "Configure system host name" +help: Configure system host name default: "vyatta" -syntax: pattern $(@) "^[-a-zA-Z0-9.]+$" ; "invalid host name $(@)" -update: "sudo sh -c \"hostname '$(@)' && \ -echo '$(@)' > /etc/hostname && \ +syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "invalid host name $VAR(@)" +update:expression: "sudo sh -c \"hostname '$VAR(@)' && \ +echo '$VAR(@)' > /etc/hostname && \ touch /etc/hosts && \ sed -i '/^127.0.1.1/d' /etc/hosts && \ -echo \\\"127.0.1.1\t $(@)\t #vyatta entry\\\" >> /etc/hosts && \ -if [ x$(../domain-name/@) != x ]; then \ -echo \\\"127.0.1.1\t $(@).$(../domain-name/@)\t #vyatta entry\\\" \ +echo \\\"127.0.1.1\t $VAR(@)\t #vyatta entry\\\" >> /etc/hosts && \ +if [ x$VAR(../domain-name/@) != x ]; then \ +echo \\\"127.0.1.1\t $VAR(@).$VAR(../domain-name/@)\t #vyatta entry\\\" \ >> /etc/hosts; fi\" " -delete: "sudo sh -c \"echo 'vyatta' > /etc/hostname && hostname 'vyatta' && \ +delete:expression: "sudo sh -c \"echo 'vyatta' > /etc/hostname && hostname 'vyatta' && \ touch /etc/hosts && \ sed -i '/^127.0.1.1/d' /etc/hosts && \ echo \\\"127.0.1.1\t vyatta\t #vyatta entry\\\" >> /etc/hosts && \ -if [ x$(../domain-name/@) != x ]; then \ -echo \\\"127.0.1.1\t vyatta.$(../domain-name/@)\t #vyatta entry\\\" \ +if [ x$VAR(../domain-name/@) != x ]; then \ +echo \\\"127.0.1.1\t vyatta.$VAR(../domain-name/@)\t #vyatta entry\\\" \ >> /etc/hosts; fi\" " diff --git a/templates/system/login/node.def b/templates/system/login/node.def index bde75b4c..ca2da1b3 100644 --- a/templates/system/login/node.def +++ b/templates/system/login/node.def @@ -1,3 +1,3 @@ -help: "Configure user access" -delete: "echo User root cannot be deleted 1>&2 && exit 1" +help: Configure user access +delete:expression: "echo User root cannot be deleted 1>&2 && exit 1" diff --git a/templates/system/login/radius-server/node.def b/templates/system/login/radius-server/node.def index 0f4ffbfe..6d87890c 100644 --- a/templates/system/login/radius-server/node.def +++ b/templates/system/login/radius-server/node.def @@ -1,10 +1,10 @@ tag: type: ipv4 -help: "Radius server authentication configuration" +help: Radius server authentication configuration # need mandatory secret. also need port & timeout (default values?) -update: "sudo sh -c \"touch /etc/raddb/server && \ -sed -i '/$(@)/d' /etc/raddb/server && \ -echo \\\"$(@):$(port/@)\t$(secret/@)\t$(timeout/@)\\\" \ +update:expression: "sudo sh -c \"touch /etc/raddb/server && \ +sed -i '/$VAR(@)/d' /etc/raddb/server && \ +echo \\\"$VAR(@):$VAR(port/@)\t$VAR(secret/@)\t$VAR(timeout/@)\\\" \ >> /etc/raddb/server\" " -delete: "sudo sh -c \"touch /etc/raddb/server && \ -sed -i '/$(@)/d' /etc/raddb/server\" " +delete:expression: "sudo sh -c \"touch /etc/raddb/server && \ +sed -i '/$VAR(@)/d' /etc/raddb/server\" " diff --git a/templates/system/login/radius-server/node.tag/port/node.def b/templates/system/login/radius-server/node.tag/port/node.def index 8c856e78..002bc8a0 100644 --- a/templates/system/login/radius-server/node.tag/port/node.def +++ b/templates/system/login/radius-server/node.tag/port/node.def @@ -1,4 +1,4 @@ type: u32 -help: "Configure radius port" -syntax: ($(@) > 0 && $(@) < 65536) ; "port must be between 1 and 65535" +help: Configure radius port +syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" default: 1812 diff --git a/templates/system/login/radius-server/node.tag/secret/node.def b/templates/system/login/radius-server/node.tag/secret/node.def index eb08eca3..71176843 100644 --- a/templates/system/login/radius-server/node.tag/secret/node.def +++ b/templates/system/login/radius-server/node.tag/secret/node.def @@ -1,2 +1,2 @@ type: txt -help: "Secret for radius access" +help: Secret for radius access diff --git a/templates/system/login/radius-server/node.tag/timeout/node.def b/templates/system/login/radius-server/node.tag/timeout/node.def index 84bb4424..23a964a6 100644 --- a/templates/system/login/radius-server/node.tag/timeout/node.def +++ b/templates/system/login/radius-server/node.tag/timeout/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Timeout for radius session" +help: Timeout for radius session default: 2 diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def index a04e990f..6c5a5c2a 100644 --- a/templates/system/login/user/node.def +++ b/templates/system/login/user/node.def @@ -1,23 +1,23 @@ tag: type: txt -help: "User account information" -syntax: pattern $(@) "^[a-zA-Z_][a-zA-Z0-9_-]*\\$?$" ; "invalid user name $(@)" +help: User account information +syntax:expression: pattern $VAR(@) "^[a-zA-Z_][a-zA-Z0-9_-]*\\$?$" ; "invalid user name $VAR(@)" # line continuation and $() expansion are done by cli, not sh. # need mandatory encrypted password. -end: "if [ -d /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID ]; \ -then rm -rf /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID && exit 0; \ +end:expression: "if [ -d /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID ]; \ +then rm -rf /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID && exit 0; \ fi && \ sudo /opt/vyatta/sbin/vyatta_update_login_user.pl \ - '$(@)' '$(full-name/@)' '$(authentication/encrypted-password/@)' \ - '$(level/@)'" -delete: "if [ x$(@) == x ]; then exit 1; fi && \ -if [ x$(@) == xroot ]; then \ + '$VAR(@)' '$VAR(full-name/@)' '$VAR(authentication/encrypted-password/@)' \ + '$VAR(level/@)'" +delete:expression: "if [ x$VAR(@) == x ]; then exit 1; fi && \ +if [ x$VAR(@) == xroot ]; then \ echo Cannot delete user \"root\" 1>&2 && exit 2; \ fi && \ -if mkdir /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID >& /dev/null; \ +if mkdir /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID >& /dev/null; \ then \ - if ! sudo /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$(@)'; then \ - rm -rf /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID; \ + if ! sudo /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$VAR(@)'; then \ + rm -rf /tmp/vyatta-delete-system-login-user-$VAR(@).$PPID; \ exit 1; \ fi; \ else \ diff --git a/templates/system/login/user/node.tag/authentication/encrypted-password/node.def b/templates/system/login/user/node.tag/authentication/encrypted-password/node.def index 33a87f59..cd800ce4 100644 --- a/templates/system/login/user/node.tag/authentication/encrypted-password/node.def +++ b/templates/system/login/user/node.tag/authentication/encrypted-password/node.def @@ -1,2 +1,2 @@ type: txt -help: "Configure encrypted password" +help: Configure encrypted password diff --git a/templates/system/login/user/node.tag/authentication/node.def b/templates/system/login/user/node.tag/authentication/node.def index 8b0f3125..4306d008 100644 --- a/templates/system/login/user/node.tag/authentication/node.def +++ b/templates/system/login/user/node.tag/authentication/node.def @@ -1 +1 @@ -help: "Authentication password" +help: Authentication password diff --git a/templates/system/login/user/node.tag/authentication/plaintext-password/node.def b/templates/system/login/user/node.tag/authentication/plaintext-password/node.def index 0e2bd7a5..1ac3c203 100644 --- a/templates/system/login/user/node.tag/authentication/plaintext-password/node.def +++ b/templates/system/login/user/node.tag/authentication/plaintext-password/node.def @@ -1,10 +1,10 @@ type: txt -help: "Configure plaintext password for encryption" +help: Configure plaintext password for encryption # if plaintext is empty, assume this is left-over from blanking the plaintext # and do nothing. to set password to empty, user needs to set the # "encrypted-password" to an empty string (which actually allows login without # password). -update: $(@) == "" \ -|| ($(../encrypted-password/@) \ - = `/usr/bin/mkpasswd -H md5 '$(@)' | tr -d \\\\n` \ - && $(@) = "") +update:expression: $VAR(@) == "" \ +|| ($VAR(../encrypted-password/@) \ + = `/usr/bin/mkpasswd -H md5 '$VAR(@)' | tr -d \\\\n` \ + && $VAR(@) = "") diff --git a/templates/system/login/user/node.tag/full-name/node.def b/templates/system/login/user/node.tag/full-name/node.def index 86b7c8d4..f9e6149a 100644 --- a/templates/system/login/user/node.tag/full-name/node.def +++ b/templates/system/login/user/node.tag/full-name/node.def @@ -1,2 +1,2 @@ type: txt -help: "Full name of the user (use quotes for names with spaces)" +help: Full name of the user (use quotes for names with spaces) diff --git a/templates/system/login/user/node.tag/level/node.def b/templates/system/login/user/node.tag/level/node.def index 30ac731c..66561e12 100644 --- a/templates/system/login/user/node.tag/level/node.def +++ b/templates/system/login/user/node.tag/level/node.def @@ -1,7 +1,7 @@ type: txt -help: "User privilege level" +help: User privilege level default: "admin" -syntax: $(@) in "admin", "users"; "Allowed levels are \"admin\" and \"users\"" -#comp_help:Possible completions: -# admin\t\tAdministrators -# users\t\tNormal users +syntax:expression: $VAR(@) in "admin", "users"; "Allowed levels are \"admin\" and \"users\"" +comp_help:Possible completions: + admin\t\tAdministrators + users\t\tNormal users diff --git a/templates/system/name-server/node.def b/templates/system/name-server/node.def index fe2bcb02..7b688a37 100644 --- a/templates/system/name-server/node.def +++ b/templates/system/name-server/node.def @@ -1,17 +1,17 @@ multi: type: ipv4 -help: "Configure domain name server" -update: "sudo sh -c \"touch /etc/resolv.conf && \ -if grep -q '$(@)' /etc/resolv.conf; then \ +help: Configure domain name server +update:expression: "sudo sh -c \"touch /etc/resolv.conf && \ +if grep -q '$VAR(@)' /etc/resolv.conf; then \ exit 0; \ else \ - echo \\\"nameserver\t $(@)\\\" >> /etc/resolv.conf; \ + echo \\\"nameserver\t $VAR(@)\\\" >> /etc/resolv.conf; \ fi && \ if [ -f /etc/ntp.conf ] && grep -q 'server' /etc/ntp.conf; then \ /usr/sbin/invoke-rc.d ntp restart >&/dev/null; \ fi\" " -delete: "sudo sh -c \"touch /etc/resolv.conf && \ -sed -i '/$(@)/d' /etc/resolv.conf && \ +delete:expression: "sudo sh -c \"touch /etc/resolv.conf && \ +sed -i '/$VAR(@)/d' /etc/resolv.conf && \ if [ -f /etc/ntp.conf ] && grep -q 'server' /etc/ntp.conf; then \ /usr/sbin/invoke-rc.d ntp restart >&/dev/null; \ fi\" " diff --git a/templates/system/node.def b/templates/system/node.def index 9c53a9f2..3f4d0643 100644 --- a/templates/system/node.def +++ b/templates/system/node.def @@ -1 +1 @@ -help: "System configuration" +help: System configuration diff --git a/templates/system/ntp-server/node.def b/templates/system/ntp-server/node.def index b121d3c3..0468d7e8 100644 --- a/templates/system/ntp-server/node.def +++ b/templates/system/ntp-server/node.def @@ -1,14 +1,14 @@ multi: type: txt -help: "Name or IP address of NTP server" -update: "sudo sh -c \"touch /etc/ntp.conf && \ -if ! grep -q 'server.*$(@)' /etc/ntp.conf; then \ - echo \\\"server $(@)\\\" >> /etc/ntp.conf && \ +help: Name or IP address of NTP server +update:expression: "sudo sh -c \"touch /etc/ntp.conf && \ +if ! grep -q 'server.*$VAR(@)' /etc/ntp.conf; then \ + echo \\\"server $VAR(@)\\\" >> /etc/ntp.conf && \ /usr/sbin/invoke-rc.d ntp restart; \ fi\" " -delete: "sudo sh -c \"touch /etc/ntp.conf && \ -if grep -q 'server.*$(@)' /etc/ntp.conf; then \ - sed -i '/server $(@)/d' /etc/ntp.conf && \ +delete:expression: "sudo sh -c \"touch /etc/ntp.conf && \ +if grep -q 'server.*$VAR(@)' /etc/ntp.conf; then \ + sed -i '/server $VAR(@)/d' /etc/ntp.conf && \ if grep -q '^server ' /etc/ntp.conf; then \ /usr/sbin/invoke-rc.d ntp restart; \ else \ diff --git a/templates/system/options/node.def b/templates/system/options/node.def index 1e49ee5b..005684e6 100644 --- a/templates/system/options/node.def +++ b/templates/system/options/node.def @@ -1 +1 @@ -help: "Configure system options" +help: Configure system options diff --git a/templates/system/options/reboot-on-panic/node.def b/templates/system/options/reboot-on-panic/node.def index 425f5a76..d16df48c 100644 --- a/templates/system/options/reboot-on-panic/node.def +++ b/templates/system/options/reboot-on-panic/node.def @@ -1,10 +1,10 @@ type: bool -help: "Configure if kernel panic causes reboot" +help: Configure if kernel panic causes reboot default: true -update: "sudo sh -c \"if [ x$(@) == xfalse ]; \ +update:expression: "sudo sh -c \"if [ x$VAR(@) == xfalse ]; \ then \ echo 0 > /proc/sys/kernel/panic; \ else \ echo 60 > /proc/sys/kernel/panic; \ fi\" " -delete: "sudo sh -c \"echo 60 > /proc/sys/kernel/panic\" " +delete:expression: "sudo sh -c \"echo 60 > /proc/sys/kernel/panic\" " diff --git a/templates/system/package/auto-sync/node.def b/templates/system/package/auto-sync/node.def index 277a5fe4..9300848e 100644 --- a/templates/system/package/auto-sync/node.def +++ b/templates/system/package/auto-sync/node.def @@ -3,10 +3,10 @@ # the /etc/crontab file must have the daily line for daily to be run type: u32 default: 1 -help: "Update the the repository cache every n days. 0 disables auto-update." -syntax: $(@) >= 0 && $(@) < 32 ; "auto-sync must be between 0 and 32 days" -update: "sudo sh -c \"touch /etc/apt/apt.conf && \ +help: Update the the repository cache every n days. 0 disables auto-update. +syntax:expression: $VAR(@) >= 0 && $VAR(@) < 32 ; "auto-sync must be between 0 and 32 days" +update:expression: "sudo sh -c \"touch /etc/apt/apt.conf && \ sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf && \ -echo \\\"APT::Periodic::Update-Package-Lists \\\"$(@)\\\";\\\" >> /etc/apt/apt.conf\" " -delete: "sudo sh -c \"touch /etc/apt/apt.conf && \ +echo \\\"APT::Periodic::Update-Package-Lists \\\"$VAR(@)\\\";\\\" >> /etc/apt/apt.conf\" " +delete:expression: "sudo sh -c \"touch /etc/apt/apt.conf && \ sed -i '/APT::Periodic::Update-Package-Lists*/d' /etc/apt/apt.conf\" " diff --git a/templates/system/package/node.def b/templates/system/package/node.def index ce185fa9..3330033a 100644 --- a/templates/system/package/node.def +++ b/templates/system/package/node.def @@ -1 +1 @@ -help: "Package Update Repository Configuration" +help: Package Update Repository Configuration diff --git a/templates/system/package/repository/node.def b/templates/system/package/repository/node.def index d0c89e28..e07967ee 100644 --- a/templates/system/package/repository/node.def +++ b/templates/system/package/repository/node.def @@ -1,11 +1,11 @@ tag: type: txt -help: "Name describing the repository" -commit: $(./url/) != ""; "Must configure the repository URL" -commit: $(./distribution/) != ""; "Must configure the repository distribution" -commit: $(./components/) != ""; "Must configure the repository component" -update: "sudo sh -c \"touch /etc/apt/sources.list && \ -sed -i '\\!# $(@) #!d' /etc/apt/sources.list && \ -echo \\\"deb $(url/@)/ $(distribution/@) $(components/@) # $(@) #\\\" >> /etc/apt/sources.list\" " -delete: "sudo sh -c \"touch /etc/apt/sources.list && \ -sed -i '\\!# $(@) #!d' /etc/apt/sources.list\" " +help: Name describing the repository +commit:expression: $VAR(./url/) != ""; "Must configure the repository URL" +commit:expression: $VAR(./distribution/) != ""; "Must configure the repository distribution" +commit:expression: $VAR(./components/) != ""; "Must configure the repository component" +update:expression: "sudo sh -c \"touch /etc/apt/sources.list && \ +sed -i '\\!# $VAR(@) #!d' /etc/apt/sources.list && \ +echo \\\"deb $VAR(url/@)/ $VAR(distribution/@) $VAR(components/@) # $VAR(@) #\\\" >> /etc/apt/sources.list\" " +delete:expression: "sudo sh -c \"touch /etc/apt/sources.list && \ +sed -i '\\!# $VAR(@) #!d' /etc/apt/sources.list\" " diff --git a/templates/system/package/repository/node.tag/components/node.def b/templates/system/package/repository/node.tag/components/node.def index 3cc0dc24..51ab9580 100644 --- a/templates/system/package/repository/node.tag/components/node.def +++ b/templates/system/package/repository/node.tag/components/node.def @@ -1,4 +1,4 @@ type: txt -help: "Repository component names" +help: Repository component names # need to prohibit '!' in repo name (sed delimiter) -syntax: pattern $(@) "^[^!]+$" ; "Do not use '!' in component name" +syntax:expression: pattern $VAR(@) "^[^!]+$" ; "Do not use '!' in component name" diff --git a/templates/system/package/repository/node.tag/description/node.def b/templates/system/package/repository/node.tag/description/node.def index 9ce7dac6..e187f9e4 100644 --- a/templates/system/package/repository/node.tag/description/node.def +++ b/templates/system/package/repository/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: "Repository description" +help: Repository description diff --git a/templates/system/package/repository/node.tag/distribution/node.def b/templates/system/package/repository/node.tag/distribution/node.def index ad54b70d..39235a6a 100644 --- a/templates/system/package/repository/node.tag/distribution/node.def +++ b/templates/system/package/repository/node.tag/distribution/node.def @@ -1,4 +1,4 @@ type: txt -help: "Distribution name" +help: Distribution name # need to prohibit '!' in repo name (sed delimiter) -syntax: pattern $(@) "^[^!]+$" ; "Do not use '!' in distribution name" +syntax:expression: pattern $VAR(@) "^[^!]+$" ; "Do not use '!' in distribution name" diff --git a/templates/system/package/repository/node.tag/url/node.def b/templates/system/package/repository/node.tag/url/node.def index ae05e6c6..7c84afce 100644 --- a/templates/system/package/repository/node.tag/url/node.def +++ b/templates/system/package/repository/node.tag/url/node.def @@ -1,4 +1,4 @@ type: txt -help: "Repository URL" +help: Repository URL # need to prohibit '!' in url (sed delimiter) -syntax: pattern $(@) "^[^!]+$" ; "Do not use '!' in url" +syntax:expression: pattern $VAR(@) "^[^!]+$" ; "Do not use '!' in url" diff --git a/templates/system/static-host-mapping/host-name/node.def b/templates/system/static-host-mapping/host-name/node.def index 275aa867..99f66fb7 100644 --- a/templates/system/static-host-mapping/host-name/node.def +++ b/templates/system/static-host-mapping/host-name/node.def @@ -1,11 +1,11 @@ tag: type: txt -help: "Map DNS names to system interfaces" -syntax: pattern $(@) "^[-a-zA-Z0-9.]+$" ; "invalid host name $(@)" -commit: $(./inet) != ""; "IP address for the static mapping must be set" -end: "sudo sh -c \"\ +help: Map DNS names to system interfaces +syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "invalid host name $VAR(@)" +commit:expression: $VAR(./inet) != ""; "IP address for the static mapping must be set" +end:expression: "sudo sh -c \"\ touch /etc/hosts; \ - sed -i '/ $(@) .*#vyatta entry/d' /etc/hosts; \ - if [ -z \"$(./inet/@)\" ]; then exit 0; fi; \ - declare -a aliases=( $(alias/@@) ); \ - echo \\\"$(inet/@)\t $(@) \\\\\${aliases[*]} \t #vyatta entry\\\" \ >> /etc/hosts\" " + sed -i '/ $VAR(@) .*#vyatta entry/d' /etc/hosts; \ + if [ -z \"$VAR(./inet/@)\" ]; then exit 0; fi; \ + declare -a aliases=( $VAR(alias/@@) ); \ + echo \\\"$VAR(inet/@)\t $VAR(@) \\${aliases[*]} \t #vyatta entry\\\" \ >> /etc/hosts\" " diff --git a/templates/system/static-host-mapping/host-name/node.tag/alias/node.def b/templates/system/static-host-mapping/host-name/node.tag/alias/node.def index e9f1de7c..2f340fc7 100644 --- a/templates/system/static-host-mapping/host-name/node.tag/alias/node.def +++ b/templates/system/static-host-mapping/host-name/node.tag/alias/node.def @@ -1,3 +1,3 @@ multi: type: txt -help: "Alias for this address" +help: Alias for this address diff --git a/templates/system/static-host-mapping/host-name/node.tag/inet/node.def b/templates/system/static-host-mapping/host-name/node.tag/inet/node.def index 4a069d9e..727c0411 100644 --- a/templates/system/static-host-mapping/host-name/node.tag/inet/node.def +++ b/templates/system/static-host-mapping/host-name/node.tag/inet/node.def @@ -1,2 +1,2 @@ type: ipv4 -help: "Internet address" +help: Internet address diff --git a/templates/system/static-host-mapping/node.def b/templates/system/static-host-mapping/node.def index 736413f6..e72527ae 100644 --- a/templates/system/static-host-mapping/node.def +++ b/templates/system/static-host-mapping/node.def @@ -1 +1 @@ -help: "Map DNS names to system interfaces" +help: Map DNS names to system interfaces diff --git a/templates/system/syslog/console/facility/node.def b/templates/system/syslog/console/facility/node.def index a46ac2f0..26b736cf 100644 --- a/templates/system/syslog/console/facility/node.def +++ b/templates/system/syslog/console/facility/node.def @@ -1,35 +1,35 @@ tag: type: txt -help: "Configure facility for console logging" -syntax: $(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$(@)\" is not a valid logging facility" -update: "sudo sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \ -FAC='$(@)' ; if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\" \ - '\\/dev\\/console' \\\"\\\\\$FAC.\\\\\$LVL\t/dev/console\n\\\"\" " -delete: "sudo sh -c \"FAC='$(@)' ; \ -if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\" \ +help: Configure facility for console logging +syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +update:expression: "sudo sh -c \"LVL=`echo -n $VAR(level/@) | tr '[a-z]' '[A-Z]'` && \ +FAC='$VAR(@)' ; if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\\" \ + '\\/dev\\/console' \\\"\\$FAC.\\$LVL\t/dev/console\n\\\"\" " +delete:expression: "sudo sh -c \"FAC='$VAR(@)' ; \ +if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\\" \ '\\/dev\\/console' ''\" " -#comp_help:Available logging facilities: -# all All facilities excluding "mark" -# auth Authentication and authorization -# authpriv Non-system authorization -# cron Cron daemon -# daemon System daemons -# kern Kernel -# lpr Line printer spooler -# mail Mail subsystem -# mark Timestamp -# news USENET subsystem -# security Authentication and authorization -# syslog Authentication and authorization -# user Application processes -# uucp UUCP subsystem -# local0 Local facility 0 -# local1 Local facility 1 -# local2 Local facility 2 -# local3 Local facility 3 -# local4 Local facility 4 -# local5 Local facility 5 -# local6 Local facility 6 -# local7 Local facility 7 +comp_help:Available logging facilities: + all All facilities excluding "mark" + auth Authentication and authorization + authpriv Non-system authorization + cron Cron daemon + daemon System daemons + kern Kernel + lpr Line printer spooler + mail Mail subsystem + mark Timestamp + news USENET subsystem + security Authentication and authorization + syslog Authentication and authorization + user Application processes + uucp UUCP subsystem + local0 Local facility 0 + local1 Local facility 1 + local2 Local facility 2 + local3 Local facility 3 + local4 Local facility 4 + local5 Local facility 5 + local6 Local facility 6 + local7 Local facility 7 diff --git a/templates/system/syslog/console/facility/node.tag/level/node.def b/templates/system/syslog/console/facility/node.tag/level/node.def index ea75775a..d690ecd2 100644 --- a/templates/system/syslog/console/facility/node.tag/level/node.def +++ b/templates/system/syslog/console/facility/node.tag/level/node.def @@ -1,13 +1,13 @@ type: txt -help: "Configure the logging level" -syntax: $(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$(@)\" is not a valid logging level" +help: Configure the logging level +syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" -#comp_help:Logging levels in descending order of severity: -# emerg Emergency messages -# alert Urgent messages -# crit Critical messages -# err Error messages -# warning Warning messages -# notice Messages for further investigation -# info Informational messages -# debug Debug messages +comp_help:Logging levels in descending order of severity: + emerg Emergency messages + alert Urgent messages + crit Critical messages + err Error messages + warning Warning messages + notice Messages for further investigation + info Informational messages + debug Debug messages diff --git a/templates/system/syslog/console/node.def b/templates/system/syslog/console/node.def index e30721d4..b4a2fc3b 100644 --- a/templates/system/syslog/console/node.def +++ b/templates/system/syslog/console/node.def @@ -1 +1 @@ -help: "Configure console logging" +help: Configure console logging diff --git a/templates/system/syslog/file/node.def b/templates/system/syslog/file/node.def index d62d2614..3861dd53 100644 --- a/templates/system/syslog/file/node.def +++ b/templates/system/syslog/file/node.def @@ -1,4 +1,4 @@ tag: type: txt -help: "Name of the syslog file to save log messages to" -syntax: pattern $(@) "^[-a-zA-Z0-9_.]+$" ; "invalid file name $(@)" +help: Name of the syslog file to save log messages to +syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9_.]+$" ; "invalid file name $VAR(@)" diff --git a/templates/system/syslog/file/node.tag/archive/files/node.def b/templates/system/syslog/file/node.tag/archive/files/node.def index ca2bf175..86fc3808 100644 --- a/templates/system/syslog/file/node.tag/archive/files/node.def +++ b/templates/system/syslog/file/node.tag/archive/files/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Number of saved files" +help: Number of saved files default: 5 diff --git a/templates/system/syslog/file/node.tag/archive/node.def b/templates/system/syslog/file/node.tag/archive/node.def index 6e857360..002003f4 100644 --- a/templates/system/syslog/file/node.tag/archive/node.def +++ b/templates/system/syslog/file/node.tag/archive/node.def @@ -1,6 +1,6 @@ -help: "Configure log file size and rotation characteristics" +help: Configure log file size and rotation characteristics # need mandatory files & size -update: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ -'$(../@)' '$(files/@)' '$(size/@)' 1\" " -delete: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ -'$(../@)' '$(files/@)' '$(size/@)' 0\" " +update:expression: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ +'$VAR(../@)' '$VAR(files/@)' '$VAR(size/@)' 1\" " +delete:expression: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ +'$VAR(../@)' '$VAR(files/@)' '$VAR(size/@)' 0\" " diff --git a/templates/system/syslog/file/node.tag/archive/size/node.def b/templates/system/syslog/file/node.tag/archive/size/node.def index a5ace52e..57955185 100644 --- a/templates/system/syslog/file/node.tag/archive/size/node.def +++ b/templates/system/syslog/file/node.tag/archive/size/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Size of log files (kbytes)" +help: Size of log files (kbytes) default: 0 diff --git a/templates/system/syslog/file/node.tag/facility/node.def b/templates/system/syslog/file/node.tag/facility/node.def index e4f018ec..7711d6a0 100644 --- a/templates/system/syslog/file/node.tag/facility/node.def +++ b/templates/system/syslog/file/node.tag/facility/node.def @@ -1,36 +1,36 @@ tag: type: txt -help: "Configure facility for file logging" -syntax: $(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$(@)\" is not a valid logging facility" -update: "sudo sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \ -FAC='$(@)' ; if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\" \ - '\\/var\\/log\\/user\\/$(../@)' \ - \\\"\\\\\$FAC.\\\\\$LVL\t/var/log/user/$(../@) \n\\\"\" " -delete: "sudo sh -c \"FAC='$(@)' ; \ -if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\" \ - '\\/var\\/log\\/user\\/$(../@)' ''\" " -#comp_help:Available logging facilities: -# all All facilities excluding "mark" -# auth Authentication and authorization -# authpriv Non-system authorization -# cron Cron daemon -# daemon System daemons -# kern Kernel -# lpr Line printer spooler -# mail Mail subsystem -# mark Timestamp -# news USENET subsystem -# security Authentication and authorization -# syslog Authentication and authorization -# user Application processes -# uucp UUCP subsystem -# local0 Local facility 0 -# local1 Local facility 1 -# local2 Local facility 2 -# local3 Local facility 3 -# local4 Local facility 4 -# local5 Local facility 5 -# local6 Local facility 6 -# local7 Local facility 7 +help: Configure facility for file logging +syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +update:expression: "sudo sh -c \"LVL=`echo -n $VAR(level/@) | tr '[a-z]' '[A-Z]'` && \ +FAC='$VAR(@)' ; if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\\" \ + '\\/var\\/log\\/user\\/$VAR(../@)' \ + \\\"\\$FAC.\\$LVL\t/var/log/user/$VAR(../@) \n\\\"\" " +delete:expression: "sudo sh -c \"FAC='$VAR(@)' ; \ +if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\\" \ + '\\/var\\/log\\/user\\/$VAR(../@)' ''\" " +comp_help:Available logging facilities: + all All facilities excluding "mark" + auth Authentication and authorization + authpriv Non-system authorization + cron Cron daemon + daemon System daemons + kern Kernel + lpr Line printer spooler + mail Mail subsystem + mark Timestamp + news USENET subsystem + security Authentication and authorization + syslog Authentication and authorization + user Application processes + uucp UUCP subsystem + local0 Local facility 0 + local1 Local facility 1 + local2 Local facility 2 + local3 Local facility 3 + local4 Local facility 4 + local5 Local facility 5 + local6 Local facility 6 + local7 Local facility 7 diff --git a/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def b/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def index ea75775a..d690ecd2 100644 --- a/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def +++ b/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def @@ -1,13 +1,13 @@ type: txt -help: "Configure the logging level" -syntax: $(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$(@)\" is not a valid logging level" +help: Configure the logging level +syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" -#comp_help:Logging levels in descending order of severity: -# emerg Emergency messages -# alert Urgent messages -# crit Critical messages -# err Error messages -# warning Warning messages -# notice Messages for further investigation -# info Informational messages -# debug Debug messages +comp_help:Logging levels in descending order of severity: + emerg Emergency messages + alert Urgent messages + crit Critical messages + err Error messages + warning Warning messages + notice Messages for further investigation + info Informational messages + debug Debug messages diff --git a/templates/system/syslog/global/archive/files/node.def b/templates/system/syslog/global/archive/files/node.def index ca2bf175..86fc3808 100644 --- a/templates/system/syslog/global/archive/files/node.def +++ b/templates/system/syslog/global/archive/files/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Number of saved files" +help: Number of saved files default: 5 diff --git a/templates/system/syslog/global/archive/node.def b/templates/system/syslog/global/archive/node.def index aefdb2d4..3691bbe0 100644 --- a/templates/system/syslog/global/archive/node.def +++ b/templates/system/syslog/global/archive/node.def @@ -1,6 +1,6 @@ -help: "Configure log file size and rotation characteristics" +help: Configure log file size and rotation characteristics # need mandatory files & size -update: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ -'$(files/@)' '$(size/@)' 1\" " -delete: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ -'$(files/@)' '$(size/@)' 0\" " +update:expression: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ +'$VAR(files/@)' '$VAR(size/@)' 1\" " +delete:expression: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \ +'$VAR(files/@)' '$VAR(size/@)' 0\" " diff --git a/templates/system/syslog/global/archive/size/node.def b/templates/system/syslog/global/archive/size/node.def index 3c8da6e8..c02fd0f1 100644 --- a/templates/system/syslog/global/archive/size/node.def +++ b/templates/system/syslog/global/archive/size/node.def @@ -1,3 +1,3 @@ type: u32 -help: "Size of log files (kbytes)" +help: Size of log files (kbytes) default: 250 diff --git a/templates/system/syslog/global/facility/node.def b/templates/system/syslog/global/facility/node.def index d98c2657..1fdaad00 100644 --- a/templates/system/syslog/global/facility/node.def +++ b/templates/system/syslog/global/facility/node.def @@ -1,35 +1,35 @@ tag: type: txt -help: "Configure facility for system logging" -syntax: $(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$(@)\" is not a valid logging facility" -update: "sudo sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \ -FAC='$(@)' ; if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ +help: Configure facility for system logging +syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +update:expression: "sudo sh -c \"LVL=`echo -n $VAR(level/@) | tr '[a-z]' '[A-Z]'` && \ +FAC='$VAR(@)' ; if [ x\\$FAC == xall ]; then FAC='*'; fi && \ /opt/vyatta/sbin/vyatta_update_syslog.pl '' '\\/var\\/log\\/messages' \ - \\\"\\\\\$FAC.\\\\\$LVL\t/var/log/messages \n\\\"\" " -delete: "sudo sh -c \"FAC='$(@)' ; \ -if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ + \\\"\\$FAC.\\$LVL\t/var/log/messages \n\\\"\" " +delete:expression: "sudo sh -c \"FAC='$VAR(@)' ; \ +if [ x\\$FAC == xall ]; then FAC='*'; fi && \ /opt/vyatta/sbin/vyatta_update_syslog.pl \ '' '\\/var\\/log\\/messages' '*.warning\t/var/log/messages \n'\" " -#comp_help:Available logging facilities: -# all All facilities excluding "mark" -# auth Authentication and authorization -# authpriv Non-system authorization -# cron Cron daemon -# daemon System daemons -# kern Kernel -# lpr Line printer spooler -# mail Mail subsystem -# mark Timestamp -# news USENET subsystem -# security Authentication and authorization -# syslog Authentication and authorization -# user Application processes -# uucp UUCP subsystem -# local0 Local facility 0 -# local1 Local facility 1 -# local2 Local facility 2 -# local3 Local facility 3 -# local4 Local facility 4 -# local5 Local facility 5 -# local6 Local facility 6 -# local7 Local facility 7 +comp_help:Available logging facilities: + all All facilities excluding "mark" + auth Authentication and authorization + authpriv Non-system authorization + cron Cron daemon + daemon System daemons + kern Kernel + lpr Line printer spooler + mail Mail subsystem + mark Timestamp + news USENET subsystem + security Authentication and authorization + syslog Authentication and authorization + user Application processes + uucp UUCP subsystem + local0 Local facility 0 + local1 Local facility 1 + local2 Local facility 2 + local3 Local facility 3 + local4 Local facility 4 + local5 Local facility 5 + local6 Local facility 6 + local7 Local facility 7 diff --git a/templates/system/syslog/global/facility/node.tag/level/node.def b/templates/system/syslog/global/facility/node.tag/level/node.def index ea75775a..d690ecd2 100644 --- a/templates/system/syslog/global/facility/node.tag/level/node.def +++ b/templates/system/syslog/global/facility/node.tag/level/node.def @@ -1,13 +1,13 @@ type: txt -help: "Configure the logging level" -syntax: $(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$(@)\" is not a valid logging level" +help: Configure the logging level +syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" -#comp_help:Logging levels in descending order of severity: -# emerg Emergency messages -# alert Urgent messages -# crit Critical messages -# err Error messages -# warning Warning messages -# notice Messages for further investigation -# info Informational messages -# debug Debug messages +comp_help:Logging levels in descending order of severity: + emerg Emergency messages + alert Urgent messages + crit Critical messages + err Error messages + warning Warning messages + notice Messages for further investigation + info Informational messages + debug Debug messages diff --git a/templates/system/syslog/global/node.def b/templates/system/syslog/global/node.def index b5166459..5fcf45b8 100644 --- a/templates/system/syslog/global/node.def +++ b/templates/system/syslog/global/node.def @@ -1 +1 @@ -help: "Configure system logging" +help: Configure system logging diff --git a/templates/system/syslog/host/node.def b/templates/system/syslog/host/node.def index a349582c..5f669a59 100644 --- a/templates/system/syslog/host/node.def +++ b/templates/system/syslog/host/node.def @@ -1,3 +1,3 @@ tag: type: txt -help: "IP address or hostname of remote syslog server" +help: IP address or hostname of remote syslog server diff --git a/templates/system/syslog/host/node.tag/facility/node.def b/templates/system/syslog/host/node.tag/facility/node.def index 363875ac..04b32e2e 100644 --- a/templates/system/syslog/host/node.tag/facility/node.def +++ b/templates/system/syslog/host/node.tag/facility/node.def @@ -1,35 +1,35 @@ tag: type: txt -help: "Configure facility for host logging" -syntax: $(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$(@)\" is not a valid logging facility" -update: "sudo sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \ -FAC='$(@)' ; if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\" '@$(../@) ' \ - \\\"\\\\\$FAC.\\\\\$LVL\t@$(../@) \n\\\"\" " -delete: "sudo sh -c \"FAC='$(@)' ; \ -if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\" \ - '@$(../@) ' ''\" " -#comp_help:Available logging facilities: -# all All facilities excluding "mark" -# auth Authentication and authorization -# authpriv Non-system authorization -# cron Cron daemon -# daemon System daemons -# kern Kernel -# lpr Line printer spooler -# mail Mail subsystem -# mark Timestamp -# news USENET subsystem -# security Authentication and authorization -# syslog Authentication and authorization -# user Application processes -# uucp UUCP subsystem -# local0 Local facility 0 -# local1 Local facility 1 -# local2 Local facility 2 -# local3 Local facility 3 -# local4 Local facility 4 -# local5 Local facility 5 -# local6 Local facility 6 -# local7 Local facility 7 +help: Configure facility for host logging +syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +update:expression: "sudo sh -c \"LVL=`echo -n $VAR(level/@) | tr '[a-z]' '[A-Z]'` && \ +FAC='$VAR(@)' ; if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\\" '@$VAR(../@) ' \ + \\\"\\$FAC.\\$LVL\t@$VAR(../@) \n\\\"\" " +delete:expression: "sudo sh -c \"FAC='$VAR(@)' ; \ +if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\\" \ + '@$VAR(../@) ' ''\" " +comp_help:Available logging facilities: + all All facilities excluding "mark" + auth Authentication and authorization + authpriv Non-system authorization + cron Cron daemon + daemon System daemons + kern Kernel + lpr Line printer spooler + mail Mail subsystem + mark Timestamp + news USENET subsystem + security Authentication and authorization + syslog Authentication and authorization + user Application processes + uucp UUCP subsystem + local0 Local facility 0 + local1 Local facility 1 + local2 Local facility 2 + local3 Local facility 3 + local4 Local facility 4 + local5 Local facility 5 + local6 Local facility 6 + local7 Local facility 7 diff --git a/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def b/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def index ea75775a..d690ecd2 100644 --- a/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def +++ b/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def @@ -1,13 +1,13 @@ type: txt -help: "Configure the logging level" -syntax: $(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$(@)\" is not a valid logging level" +help: Configure the logging level +syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" -#comp_help:Logging levels in descending order of severity: -# emerg Emergency messages -# alert Urgent messages -# crit Critical messages -# err Error messages -# warning Warning messages -# notice Messages for further investigation -# info Informational messages -# debug Debug messages +comp_help:Logging levels in descending order of severity: + emerg Emergency messages + alert Urgent messages + crit Critical messages + err Error messages + warning Warning messages + notice Messages for further investigation + info Informational messages + debug Debug messages diff --git a/templates/system/syslog/node.def b/templates/system/syslog/node.def index e6e68aba..012a71ba 100644 --- a/templates/system/syslog/node.def +++ b/templates/system/syslog/node.def @@ -1,3 +1,3 @@ -help: "Configure syslog daemon" -delete: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_syslog.pl \ +help: Configure syslog daemon +delete:expression: "sudo sh -c \"/opt/vyatta/sbin/vyatta_update_syslog.pl \ '' '\\/var\\/log\\/messages' '*.warning\t/var/log/messages \n'\" " diff --git a/templates/system/syslog/user/node.def b/templates/system/syslog/user/node.def index ba731ca3..d30126ee 100644 --- a/templates/system/syslog/user/node.def +++ b/templates/system/syslog/user/node.def @@ -1,3 +1,3 @@ tag: type: txt -help: "Configure syslog user account output" +help: Configure syslog user account output diff --git a/templates/system/syslog/user/node.tag/facility/node.def b/templates/system/syslog/user/node.tag/facility/node.def index a3e6e5fc..1d349e16 100644 --- a/templates/system/syslog/user/node.tag/facility/node.def +++ b/templates/system/syslog/user/node.tag/facility/node.def @@ -1,35 +1,35 @@ tag: type: txt -help: "Configure facility for user logging" -syntax: $(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$(@)\" is not a valid logging facility" -update: "sudo sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \ -FAC='$(@)' ; if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\\\$LVL\\\" \ - ' $(../@) ' \\\"\\\\\$FAC.\\\\\$LVL $(../@) \n\\\"\" " -delete: "sudo sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \ -FAC='$(@)' ; if [ x\\\\\$FAC == xall ]; then FAC='*'; fi && \ -/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\\\\$FAC\\.\\\\\$LVL\\\" \ - ' $(../@) ' ''\" " -#comp_help:Available logging facilities: -# all All facilities excluding "mark" -# auth Authentication and authorization -# authpriv Non-system authorization -# cron Cron daemon -# daemon System daemons -# kern Kernel -# lpr Line printer spooler -# mail Mail subsystem -# mark Timestamp -# news USENET subsystem -# security Authentication and authorization -# syslog Authentication and authorization -# user Application processes -# uucp UUCP subsystem -# local0 Local facility 0 -# local1 Local facility 1 -# local2 Local facility 2 -# local3 Local facility 3 -# local4 Local facility 4 -# local5 Local facility 5 -# local6 Local facility 6 -# local7 Local facility 7 +help: Configure facility for user logging +syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +update:expression: "sudo sh -c \"LVL=`echo -n $VAR(level/@) | tr '[a-z]' '[A-Z]'` && \ +FAC='$VAR(@)' ; if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\$LVL\\\" \ + ' $VAR(../@) ' \\\"\\$FAC.\\$LVL $VAR(../@) \n\\\"\" " +delete:expression: "sudo sh -c \"LVL=`echo -n $VAR(level/@) | tr '[a-z]' '[A-Z]'` && \ +FAC='$VAR(@)' ; if [ x\\$FAC == xall ]; then FAC='*'; fi && \ +/opt/vyatta/sbin/vyatta_update_syslog.pl \\\"\\$FAC\\.\\$LVL\\\" \ + ' $VAR(../@) ' ''\" " +comp_help:Available logging facilities: + all All facilities excluding "mark" + auth Authentication and authorization + authpriv Non-system authorization + cron Cron daemon + daemon System daemons + kern Kernel + lpr Line printer spooler + mail Mail subsystem + mark Timestamp + news USENET subsystem + security Authentication and authorization + syslog Authentication and authorization + user Application processes + uucp UUCP subsystem + local0 Local facility 0 + local1 Local facility 1 + local2 Local facility 2 + local3 Local facility 3 + local4 Local facility 4 + local5 Local facility 5 + local6 Local facility 6 + local7 Local facility 7 diff --git a/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def b/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def index ea75775a..d690ecd2 100644 --- a/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def +++ b/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def @@ -1,13 +1,13 @@ type: txt -help: "Configure the logging level" -syntax: $(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$(@)\" is not a valid logging level" +help: Configure the logging level +syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" -#comp_help:Logging levels in descending order of severity: -# emerg Emergency messages -# alert Urgent messages -# crit Critical messages -# err Error messages -# warning Warning messages -# notice Messages for further investigation -# info Informational messages -# debug Debug messages +comp_help:Logging levels in descending order of severity: + emerg Emergency messages + alert Urgent messages + crit Critical messages + err Error messages + warning Warning messages + notice Messages for further investigation + info Informational messages + debug Debug messages diff --git a/templates/system/time-zone/node.def b/templates/system/time-zone/node.def index 60e87e12..450429d0 100644 --- a/templates/system/time-zone/node.def +++ b/templates/system/time-zone/node.def @@ -1,35 +1,35 @@ type: txt -help: "Configure local timezone" +help: Configure local timezone default: "GMT" -update: "LTF=\"/usr/share/zoneinfo\" && \ -case \"$(@)\" in \ - [Ll][Oo][Ss]*) LTF=\"\\\$LTF/US/Pacific\" ;; \ - [Dd][Ee][Nn]*) LTF=\"\\\$LTF/US/Mountain\" ;; \ - [Hh][Oo][Nn]*) LTF=\"\\\$LTF/US/Hawaii\" ;; \ - [Nn][Ee][Ww]*) LTF=\"\\\$LTF/US/Eastern\" ;; \ - [Cc][Hh][Ii]*) LTF=\"\\\$LTF/US/Central\" ;; \ - [Aa][Nn][Cc]*) LTF=\"\\\$LTF/US/Alaska\" ;; \ - [Pp][Hh][Oo]*) LTF=\"\\\$LTF/US/Arizona\" ;; \ - *) LTF=\"\\\$LTF/Etc/$(@)\" ;; \ +update:expression: "LTF=\"/usr/share/zoneinfo\" && \ +case \"$VAR(@)\" in \ + [Ll][Oo][Ss]*) LTF=\"$LTF/US/Pacific\" ;; \ + [Dd][Ee][Nn]*) LTF=\"$LTF/US/Mountain\" ;; \ + [Hh][Oo][Nn]*) LTF=\"$LTF/US/Hawaii\" ;; \ + [Nn][Ee][Ww]*) LTF=\"$LTF/US/Eastern\" ;; \ + [Cc][Hh][Ii]*) LTF=\"$LTF/US/Central\" ;; \ + [Aa][Nn][Cc]*) LTF=\"$LTF/US/Alaska\" ;; \ + [Pp][Hh][Oo]*) LTF=\"$LTF/US/Arizona\" ;; \ + *) LTF=\"$LTF/Etc/$VAR(@)\" ;; \ esac && \ -if [ -e \"\\\$LTF\" ]; then \ - sudo ln -fs \\\$LTF /etc/localtime; \ +if [ -e \"$LTF\" ]; then \ + sudo ln -fs $LTF /etc/localtime; \ else \ echo \"Invalid timezone\"; \ exit 1; \ fi" -delete: "sudo ln -fs /usr/share/zoneinfo/GMT /etc/localtime" -#allowed: local -a list=( "Los Angeles" "New York" "Denver" "Chicago" \ -# "Anchorage" "Honolulu" "Phoenix" "GMT" ) -# for (( i = -1; i > -13; i-- )); do -# list[${#list[@]}]="GMT$i"; -# done -# for (( i = 1; i < 13; i++ )); do -# list[${#list[@]}]="GMT+$i"; -# done -# for zone in "${list[@]}"; do -# echo \"$zone\" -# done -#comp_help:Enter one of the following time zones: -# Honolulu Anchorage Los Angeles Phoenix Denver Chicago New York -# GMT GMT-1 ... GMT-12 GMT+1 ... GMT+12 +delete:expression: "sudo ln -fs /usr/share/zoneinfo/GMT /etc/localtime" +allowed: local -a list=( "Los Angeles" "New York" "Denver" "Chicago" \ + "Anchorage" "Honolulu" "Phoenix" "GMT" ) + for (( i = -1; i > -13; i-- )); do + list[${#list[@]}]="GMT$i"; + done + for (( i = 1; i < 13; i++ )); do + list[${#list[@]}]="GMT+$i"; + done + for zone in "${list[@]}"; do + echo \"$zone\" + done +comp_help:Enter one of the following time zones: + Honolulu Anchorage Los Angeles Phoenix Denver Chicago New York + GMT GMT-1 ... GMT-12 GMT+1 ... GMT+12 -- cgit v1.2.3