summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2008-10-16 18:22:25 -0700
committerStig Thormodsrud <stig@io.vyatta.com>2008-10-16 18:22:25 -0700
commitdcf88dd71fb7c6464464472ca829a5a59ca4d3b6 (patch)
tree49118ee2879ff7c4131d4fb28916f6096a7fc629 /templates
parent817dc77ad42cd9c7e6ebb394a094af8a6d287559 (diff)
downloadvyatta-cfg-system-dcf88dd71fb7c6464464472ca829a5a59ca4d3b6.tar.gz
vyatta-cfg-system-dcf88dd71fb7c6464464472ca829a5a59ca4d3b6.zip
Change telnet allow-root type from txt to bool.
Fix tab completion on bool.
Diffstat (limited to 'templates')
-rw-r--r--templates/service/ssh/allow-root/node.def6
-rw-r--r--templates/service/telnet/allow-root/node.def10
2 files changed, 13 insertions, 3 deletions
diff --git a/templates/service/ssh/allow-root/node.def b/templates/service/ssh/allow-root/node.def
index 87ff1ded..25a5a97a 100644
--- a/templates/service/ssh/allow-root/node.def
+++ b/templates/service/ssh/allow-root/node.def
@@ -6,3 +6,9 @@ update: if [ "$VAR(@)" == "true" ];
else regex='/^PermitRootLogin/s/yes/no/'
fi
sudo sed -i -e "$regex" /etc/ssh/sshd_config
+
+comp_help: possible completions:
+ true Enable root login over ssh
+ false Disable root login over ssh
+
+allowed: echo "true false"
diff --git a/templates/service/telnet/allow-root/node.def b/templates/service/telnet/allow-root/node.def
index 347a9476..b853fc42 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
@@ -34,3 +32,9 @@ delete: pids=`who -u | awk -F " " '{print $7}'`
done
sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null
/bin/true
+
+comp_help: possible completions:
+ true Enable root login over telnet
+ false Disable root login over telnet
+
+allowed: echo "true false"