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/service/ssh | |
parent | c2c002021eab0adff7e4d268535170658a1b0c6c (diff) | |
download | vyatta-cfg-quagga-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.tar.gz vyatta-cfg-quagga-622bbf801bd435a3848c669ff2c0e9090cd2bb4e.zip |
convert templates to new syntax
Diffstat (limited to 'templates/service/ssh')
-rw-r--r-- | templates/service/ssh/node.def | 14 | ||||
-rw-r--r-- | templates/service/ssh/port/node.def | 2 | ||||
-rw-r--r-- | templates/service/ssh/protocol-version/node.def | 2 |
3 files changed, 9 insertions, 9 deletions
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 |