diff options
author | An-Cheng Huang <ancheng@sydney.vyatta.com> | 2007-10-24 10:01:04 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@sydney.vyatta.com> | 2007-10-24 10:01:04 -0700 |
commit | 1229e8c6f130c62c42900f424a772d4e9c5e8ef5 (patch) | |
tree | a89f7b29d4a7e62c803f3b0306922777681f319a /templates/system/ntp-server | |
parent | b1fcb904eab1425d349fd7ab8d65b39c1bfb2e3f (diff) | |
download | vyatta-cfg-system-1229e8c6f130c62c42900f424a772d4e9c5e8ef5.tar.gz vyatta-cfg-system-1229e8c6f130c62c42900f424a772d4e9c5e8ef5.zip |
add 'sudo' for 'system' and 'service/ssh' configuration commands.
Diffstat (limited to 'templates/system/ntp-server')
-rw-r--r-- | templates/system/ntp-server/node.def | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/system/ntp-server/node.def b/templates/system/ntp-server/node.def index 230dd313..b121d3c3 100644 --- a/templates/system/ntp-server/node.def +++ b/templates/system/ntp-server/node.def @@ -1,12 +1,12 @@ multi: type: txt help: "Name or IP address of NTP server" -update: "touch /etc/ntp.conf && \ +update: "sudo sh -c \"touch /etc/ntp.conf && \ if ! grep -q 'server.*$(@)' /etc/ntp.conf; then \ - echo \"server $(@)\" >> /etc/ntp.conf && \ + echo \\\"server $(@)\\\" >> /etc/ntp.conf && \ /usr/sbin/invoke-rc.d ntp restart; \ -fi" -delete: "touch /etc/ntp.conf && \ +fi\" " +delete: "sudo sh -c \"touch /etc/ntp.conf && \ if grep -q 'server.*$(@)' /etc/ntp.conf; then \ sed -i '/server $(@)/d' /etc/ntp.conf && \ if grep -q '^server ' /etc/ntp.conf; then \ @@ -14,4 +14,4 @@ if grep -q 'server.*$(@)' /etc/ntp.conf; then \ else \ /usr/sbin/invoke-rc.d ntp stop; \ fi; \ -fi" +fi\" " |