summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-07 17:10:25 +0200
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-10-07 17:10:25 +0200
commit7232e04d5d021f60e4cf6463328c165f19d56c6c (patch)
tree29344915228b09fce32912934b87666219bfe1b0
parent2e57bf9a4220a1c99cdb87136fad1b83d14cc454 (diff)
downloadvyatta-cfg-system-7232e04d5d021f60e4cf6463328c165f19d56c6c.tar.gz
vyatta-cfg-system-7232e04d5d021f60e4cf6463328c165f19d56c6c.zip
Change allow-root nodes to boolean
These are boolean, not text fields. Only allowed value is true/false
-rw-r--r--templates/service/ssh/allow-root/node.def8
-rw-r--r--templates/service/telnet/allow-root/node.def10
2 files changed, 10 insertions, 8 deletions
diff --git a/templates/service/ssh/allow-root/node.def b/templates/service/ssh/allow-root/node.def
index 9aa98826..058735ed 100644
--- a/templates/service/ssh/allow-root/node.def
+++ b/templates/service/ssh/allow-root/node.def
@@ -1,7 +1,6 @@
-type: txt
+type: bool
default: false
help: Enable/disable root login over ssh
-syntax:expression: $VAR(@) in "true", "false" ; "must be true or false"
update: if [ \"$VAR(@)\" == \"true\" ]; then
sudo ed - /etc/ssh/sshd_config <<-"EOF"
/^PermitRootLogin/s/no/yes/
@@ -13,4 +12,7 @@ update: if [ \"$VAR(@)\" == \"true\" ]; then
wq
EOF
fi
- /bin/true
+comp_help: possible completions:
+ true Allow root to login over ssh
+ false Don't allow root to login over ssh(default)
+
diff --git a/templates/service/telnet/allow-root/node.def b/templates/service/telnet/allow-root/node.def
index 347a9476..e01763b6 100644
--- a/templates/service/telnet/allow-root/node.def
+++ b/templates/service/telnet/allow-root/node.def
@@ -1,9 +1,7 @@
-type: txt
+type: bool
default: false
help: Enable/disable root login
-syntax:expression: $VAR(@) in "true", "false" ; "must be true or false"
-
update: pids=`who -u | awk -F " " '{print $7}'`
for i in $pids
do
@@ -20,7 +18,6 @@ update: pids=`who -u | awk -F " " '{print $7}'`
else
sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null
fi
- /bin/true
delete: pids=`who -u | awk -F " " '{print $7}'`
for i in $pids
@@ -33,4 +30,7 @@ delete: pids=`who -u | awk -F " " '{print $7}'`
fi
done
sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null
- /bin/true
+
+comp_help: possible completions:
+ true Allow root to login via telnet
+ false Don't allow root to login via telnet(default)