diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:59:02 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-31 07:59:02 -0800 |
commit | 622bbf801bd435a3848c669ff2c0e9090cd2bb4e (patch) | |
tree | 328d04410e8fed64e6a8b25abdf58f199d916c2d /templates/system/host-name | |
parent | c2c002021eab0adff7e4d268535170658a1b0c6c (diff) | |
download | vyatta-cfg-system-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.tar.gz vyatta-cfg-system-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.zip |
convert templates to new syntax
Diffstat (limited to 'templates/system/host-name')
-rw-r--r-- | templates/system/host-name/node.def | 20 |
1 files changed, 10 insertions, 10 deletions
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\" " |