summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-12-11 18:59:23 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-12-11 18:59:23 -0800
commitc4551bb0a5e3ae1780831b5037a118e3971b5c95 (patch)
tree6e057a6ad681c496c221a81ff41e6f43466c2a4b /templates
parent43f2852dd74d9dd60d955478d8d7035ebacef46b (diff)
downloadvyatta-cfg-system-c4551bb0a5e3ae1780831b5037a118e3971b5c95.tar.gz
vyatta-cfg-system-c4551bb0a5e3ae1780831b5037a118e3971b5c95.zip
fix sudo problem on installed system
Diffstat (limited to 'templates')
-rw-r--r--templates/system/host-name/node.def3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/system/host-name/node.def b/templates/system/host-name/node.def
index 97d9a36b..e1370b70 100644
--- a/templates/system/host-name/node.def
+++ b/templates/system/host-name/node.def
@@ -3,13 +3,14 @@ help: "Configure system host name"
default: "vyatta"
syntax: pattern $(@) "^[-a-zA-Z0-9.]+$" ; "invalid host name $(@)"
update: "sudo sh -c \"hostname '$(@)' && \
+echo '$(@)' > /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\\\" \
>> /etc/hosts; fi\" "
-delete: "sudo sh -c \"echo > /etc/hostname.conf && hostname 'vyatta' && \
+delete: "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 && \