From 1041db879c6bdfa86f6a8b19e1542475db6dffc9 Mon Sep 17 00:00:00 2001
From: An-Cheng Huang <ancheng@vyatta.com>
Date: Wed, 5 Dec 2007 20:18:58 -0800
Subject: add "allow-root" option for telnet (default "false").

---
 templates/service/telnet/allow-root/node.def | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 templates/service/telnet/allow-root/node.def

(limited to 'templates/service/telnet/allow-root/node.def')

diff --git a/templates/service/telnet/allow-root/node.def b/templates/service/telnet/allow-root/node.def
new file mode 100644
index 00000000..654023af
--- /dev/null
+++ b/templates/service/telnet/allow-root/node.def
@@ -0,0 +1,10 @@
+type: bool
+default: false
+help: "Enable/disable root login"
+update: "if [ \"$(@)\" == \"true\" ]; then \
+           sudo mv -f /etc/securetty /etc/securetty.allow-root >&/dev/null; \
+         else
+           sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null; \
+         fi ; /bin/true"
+delete: "sudo mv -f /etc/securetty.allow-root /etc/securetty >&/dev/null ; \
+         /bin/true"
-- 
cgit v1.2.3

