summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-20 09:50:31 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-07-20 09:50:31 -0700
commit983c23fdcb8204238220a26a279d718cd6dff821 (patch)
treea0d5cb3f37a5535fbadf96dd18ae6ce65b414301 /templates/interfaces/ethernet
parentb5ebff1894236ae188f047db78cdcdeedf47dfe1 (diff)
downloadvyatta-cfg-quagga-983c23fdcb8204238220a26a279d718cd6dff821.tar.gz
vyatta-cfg-quagga-983c23fdcb8204238220a26a279d718cd6dff821.zip
Use val_help: for interface name help
Use common method for formatting CLI style help when entering interface name. Move loopback name syntax check into CLI expression to avoid overhead of perl here.
Diffstat (limited to 'templates/interfaces/ethernet')
-rw-r--r--templates/interfaces/ethernet/node.def4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def
index 1b0a083f..5f196f59 100644
--- a/templates/interfaces/ethernet/node.def
+++ b/templates/interfaces/ethernet/node.def
@@ -2,11 +2,11 @@ tag:
priority: 318
type: txt
help: Ethernet interface name
-comp_help: Enter Ethernet interface name (eth0 - eth999)
-
allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet
+val_help: <ethN>; Ethernet interface name
syntax:expression: pattern $VAR(@) "^eth[0-9]+$" \
; "interface ethernet $VAR(@): not a valid name"
+
syntax:expression: exec \
"if [ ! -d /sys/class/net/$VAR(@) ]; then \
echo \"interface ethernet $VAR(@): does not exist\";