summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/service/telnet/listen-address/node.def3
-rw-r--r--templates/service/telnet/port/node.def2
2 files changed, 5 insertions, 0 deletions
diff --git a/templates/service/telnet/listen-address/node.def b/templates/service/telnet/listen-address/node.def
index 9faea595..cd016628 100644
--- a/templates/service/telnet/listen-address/node.def
+++ b/templates/service/telnet/listen-address/node.def
@@ -2,3 +2,6 @@ type: ipv4,ipv6
help: Local addresses telnet should listen on
val_help: ipv4: IP address to listen for incoming connections
val_help: ipv6: IPv6 address to listen for incoming connections
+
+commit:expression: exec "/opt/vyatta/sbin/local_ip $VAR(@)"; \
+ "IP address $VAR(@) doesn\'t exist on this system"
diff --git a/templates/service/telnet/port/node.def b/templates/service/telnet/port/node.def
index b15d4b6a..c4db688a 100644
--- a/templates/service/telnet/port/node.def
+++ b/templates/service/telnet/port/node.def
@@ -5,3 +5,5 @@ help: Port for TELNET service
val_help: u32:1-65535; Numeric IP port
syntax:expression: $VAR(@) > 0 && $VAR(@) <= 65535 ; \
"Port number must be in range 1 to 65535"
+commit:expression: exec "sudo /opt/vyatta/sbin/is_port_available.pl $VAR(@)"; \
+ "Port $VAR(@) is already in use!"