diff options
23 files changed, 271 insertions, 49 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl index 05323e3..9513ffa 100755 --- a/scripts/vyatta-load-config.pl +++ b/scripts/vyatta-load-config.pl @@ -28,16 +28,19 @@ use VyattaConfigLoad; my $etcdir = $ENV{vyatta_sysconfdir}; my $sbindir = $ENV{vyatta_sbindir}; my $bootpath = $etcdir . "/config"; +my $load_file = $bootpath . "/config.boot"; -if ($#ARGV != 0) { +if ($#ARGV > 0) { print "Usage: load <config_file_name>\n"; exit 1; } -my $load_file = $ARGV[0]; -if (!($load_file =~ /^\//)) { - # relative path - $load_file = "$bootpath/$load_file"; +if (defined($ARGV[0])) { + $load_file = $ARGV[0]; + if (!($load_file =~ /^\//)) { + # relative path + $load_file = "$bootpath/$load_file"; + } } if (!open(CFG, "<$load_file")) { diff --git a/src/cli_def.l b/src/cli_def.l index 07c9c68..d73f1c4 100644 --- a/src/cli_def.l +++ b/src/cli_def.l @@ -19,8 +19,9 @@ static char str_delim = 0; static int eof_seen = 0; static int pre_str_state = 0; -static char *reg_fields[] = { "default", "tag", "type", "multi", NULL }; -static int reg_fields_t[] = { DEFAULT, TAG, TYPE, MULTI, 0 }; +static char *reg_fields[] = { "default", "tag", "type", "multi", "priority", + NULL }; +static int reg_fields_t[] = { DEFAULT, TAG, TYPE, MULTI, PRIORITY, 0 }; static char *act_fields[] = { "help", "syntax", "commit", "delete", "update", "activate", "create", "begin", "end", @@ -262,7 +263,7 @@ RE_OP_COND (==|!=|<|>|<=|>=|in) RE_OP_OTHER (pattern|exec|,|\|\||&&|=|!|\(|\)|;) /* template fields */ -RE_REG_FIELD (default|tag|type|multi) +RE_REG_FIELD (default|tag|type|multi|priority) RE_ACT_FIELD (help|syntax|commit|delete|update|activate|create|begin|end|comp_help|allowed) %% diff --git a/src/cli_new.c b/src/cli_new.c index 1ecbe83..26cc719 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -1435,7 +1435,7 @@ static int expand_string(char *stringp) if(clind_config_engine_apply_command_path(n_cfg_path, n_tmpl_path, n_cmd_path, - FALSE, + TRUE, &cv, get_cdirp(), get_tdirp(), diff --git a/src/cli_parse.y b/src/cli_parse.y index 6378bc9..dd3d7d2 100644 --- a/src/cli_parse.y +++ b/src/cli_parse.y @@ -1,8 +1,12 @@ %{ - #include <assert.h> #include <stdio.h> #include <string.h> +#include <errno.h> +#include <stdlib.h> + +#define __USE_ISOC99 +#include <limits.h> #include "cli_val.h" @@ -30,6 +34,7 @@ static void cli_deferror(const char *); %token TYPE %token HELP %token DEFAULT +%token PRIORITY %token PATTERN %token EXEC %token SYNTAX @@ -101,6 +106,7 @@ type: TYPE TYPE_DEF cause: help_cause | default_cause + | priority_stmt | syntax_cause | ACTION action { append(parse_defp->actions + $1, $2, 0);} | dummy_stmt @@ -126,6 +132,25 @@ default_cause: DEFAULT STRING parse_defp->def_default = $2; } +priority_stmt: PRIORITY VALUE + { + char *tmp = $2.val; + long long int cval = 0; + char *endp = NULL; + errno = 0; + cval = strtoll(tmp, &endp, 10); + if (($2.val_type != INT_TYPE) + || (errno == ERANGE + && (cval == LLONG_MAX || cval == LLONG_MIN)) + || (errno != 0 && cval == 0) + || (*endp != '\0') || (cval < 0) || (cval > UINT_MAX)) { + yy_cli_parse_error((const char *) + "Priority must be <u32>\n"); + } else { + parse_defp->def_priority = cval; + } + } + syntax_cause: SYNTAX exp {append(parse_defp->actions + syntax_act, $2, 0);} ; diff --git a/src/cli_val.h b/src/cli_val.h index edbda41..520fa8e 100644 --- a/src/cli_val.h +++ b/src/cli_val.h @@ -101,6 +101,7 @@ typedef struct { char *def_type_help; char *def_node_help; char *def_default; + unsigned int def_priority; boolean tag; boolean multi; vtw_list actions[top_act]; diff --git a/src/cli_val_engine.c b/src/cli_val_engine.c index adf40a4..a81f413 100644 --- a/src/cli_val_engine.c +++ b/src/cli_val_engine.c @@ -56,6 +56,9 @@ #include "cli_val_engine.h" + +static int is_multi_node(clind_path_ref tmpl_path); + /********************* * Data definitions * @@ -129,6 +132,13 @@ static char** clind_get_current_value(clind_path_ref cfg_path, int value_ref = 0; *ret_size=0; + + if (check_existence) { + if (is_multi_node(tmpl_path)) { + check_existence = FALSE; + } + } + DPRINT("get_current_value cfg[%s] tmpl[%s] chkexist=%d\n", clind_path_get_path_string(cfg_path), clind_path_get_path_string(tmpl_path), @@ -217,6 +227,7 @@ static char** clind_get_current_value(clind_path_ref cfg_path, struct stat statbuf; /* Directory reference: */ + if(!check_existence || (lstat(cfg_path_string, &statbuf) == 0)) { ret=(char**)realloc(ret,sizeof(char*)*1); ret[0]=clind_unescape(cfg_end); diff --git a/src/commit.c b/src/commit.c index 534757c..1221e37 100644 --- a/src/commit.c +++ b/src/commit.c @@ -15,6 +15,18 @@ #include "cli_parse.h" #include "cli_path_utils.h" +struct DirIndex { + int dirname_index; + int dirname_ct; + struct DirSort** dirname; +}; + +struct DirSort { + char name[255]; + unsigned long priority; +}; + + static char def_name[] = DEF_NAME; static char tag_name[] = TAG_NAME; static char opaque_name[] = OPQ_NAME; @@ -53,21 +65,101 @@ static void make_dir() } #endif -static struct dirent * -get_next_filtered_dirent(DIR *dp, int exclude_wh) +static int +compare_dirname(const void *p, const void *q) +{ + const struct DirSort *a = (const struct DirSort*)*(struct Dirsort **)p; + const struct DirSort *b = (const struct DirSort*)*(struct Dirsort **)q; + if (a->priority == b->priority) { + return strcmp(a->name,b->name); + } + return ((long)b->priority - (long)a->priority); +} + +static int +compare_dirname_reverse_priority(const void *p, const void *q) +{ + const struct DirSort *a = (const struct DirSort*)*(struct Dirsort **)p; + const struct DirSort *b = (const struct DirSort*)*(struct Dirsort **)q; + if (a->priority == b->priority) { + return strcmp(a->name,b->name); + } + return ((long)a->priority - (long)b->priority); +} + +struct DirIndex* +init_next_filtered_dirname(DIR *dp, int sort_order, int exclude_wh) { - struct dirent *dirp = NULL; + struct DirIndex *di = malloc(sizeof(struct DirIndex)); + di->dirname = malloc(1024 * sizeof(char*)); + di->dirname_ct = 0; + di->dirname_index = 0; + + struct dirent *dirp; while ((dirp = readdir(dp)) != NULL) { if (strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0 || strcmp(dirp->d_name, MOD_NAME) == 0 || strcmp(dirp->d_name, opaque_name) == 0 || (exclude_wh && strncmp(dirp->d_name, ".wh.", 4) == 0)) { continue; - } else { - return dirp; + } + else { + struct DirSort *d = malloc(sizeof(struct DirSort)); + if (strlen(dirp->d_name) >= 255) { + bye("configuration value exceeds 255 chars\n"); + } + strcpy(d->name,dirp->d_name); + d->priority = (unsigned long)0; + vtw_def def; + char *path; + path = malloc(strlen(t_path.path)+strlen(dirp->d_name)+2+8+1); + sprintf(path,"%s/%s/node.def",t_path.path,dirp->d_name); + struct stat s; + if ((lstat(path,&s) >= 0) && + ((s.st_mode & S_IFMT) == S_IFREG)) { + memset(&def, 0, sizeof(def)); + if (parse_def(&def,path,FALSE) == 0) { + d->priority = def.def_priority; + } + } + free(path); + di->dirname[di->dirname_ct++] = d; + if (di->dirname_ct % 1024 == 0) { + di->dirname = realloc(di->dirname, (di->dirname_ct+1024)*sizeof(char*)); + } } } - return dirp; + if (sort_order == 0) { + qsort(di->dirname, di->dirname_ct, sizeof(char*), compare_dirname); + } + else { + qsort(di->dirname, di->dirname_ct, sizeof(char*), compare_dirname_reverse_priority); + } + return di; +} + +static char* +get_next_filtered_dirname(struct DirIndex *di) +{ + if (di == NULL || di->dirname_index == di->dirname_ct) { + return NULL; + } + return di->dirname[di->dirname_index++]->name; +} + +void +release_dir_index(struct DirIndex *di) +{ + if (di != NULL) { + int i; + for (i = 0; i < di->dirname_ct; ++i) { + if (di->dirname[i] != NULL) { + free((struct DirSort*)di->dirname[i]); + } + } + free(di); + di = NULL; + } } /************************************************* @@ -88,7 +180,7 @@ static boolean validate_dir_for_commit() boolean value_present=FALSE; int subdirs_number=0; DIR *dp=NULL; - struct dirent *dirp=NULL; + char *dirname = NULL; char *cp=NULL; boolean ret=TRUE; char *uename = NULL; @@ -130,14 +222,14 @@ static boolean validate_dir_for_commit() if (def_present && def.tag) { push_path(&t_path, tag_name); /* PUSH 2a */ } - - while ((dirp = get_next_filtered_dirent(dp, 1)) != NULL) { + struct DirIndex *di = init_next_filtered_dirname(dp,0,1); + while ((dirname = get_next_filtered_dirname(di)) != NULL) { subdirs_number++; if(uename) my_free(uename); - uename = clind_unescape(dirp->d_name); + uename = clind_unescape(dirname); if (strcmp(uename, VAL_NAME) == 0) { @@ -251,6 +343,7 @@ static boolean validate_dir_for_commit() pop_path(&t_path); /* for PUSH 2b */ } // while + release_dir_index(di); status = closedir(dp); if (status) bye("Cannot close dir %s\n", m_path.path); @@ -960,16 +1053,18 @@ valstruct_append(valstruct *mvals, char *cp, vtw_type_e type) */ static void get_filtered_directory_listing(DIR *dp, valstruct *mvals, vtw_type_e type, - int exclude_wh) + int exclude_wh, int sort_order) { - struct dirent *dirp = NULL; + char *dname = NULL; char *cp = NULL; memset(mvals, 0, sizeof (valstruct)); - while ((dirp = get_next_filtered_dirent(dp, exclude_wh)) != NULL) { - cp = clind_unescape(dirp->d_name); + struct DirIndex *di = init_next_filtered_dirname(dp, sort_order, exclude_wh); + while ((dname = get_next_filtered_dirname(di)) != NULL) { + cp = clind_unescape(dname); valstruct_append(mvals, cp, type); } + release_dir_index(di); } /* check if a value is one of those in a valstruct. @@ -1073,19 +1168,19 @@ static boolean commit_delete_children(vtw_def *defp, boolean deleting, memset(&cur_sorted, 0, sizeof(vtw_sorted)); /* changes directory */ - get_filtered_directory_listing(dp, &mvals, type, 0); + get_filtered_directory_listing(dp, &mvals, type, 0, 1); if (closedir(dp) != 0) { INTERNAL; } if (adp && mdp) { /* active directory */ - get_filtered_directory_listing(adp, &valsA, type, 0); + get_filtered_directory_listing(adp, &valsA, type, 0, 1); if (closedir(adp) != 0) { INTERNAL; } /* modified directory */ - get_filtered_directory_listing(mdp, &valsM, type, 0); + get_filtered_directory_listing(mdp, &valsM, type, 0, 1); if (closedir(mdp) != 0) { INTERNAL; } @@ -1164,7 +1259,7 @@ static boolean commit_update_children(vtw_def *defp, boolean creating, if (type == ERROR_TYPE) type = TEXT_TYPE; - get_filtered_directory_listing(dp, &mvals, type, 0); + get_filtered_directory_listing(dp, &mvals, type, 0, 0); if (closedir(dp) != 0) { INTERNAL; } diff --git a/src/delete.c b/src/delete.c index bb36fd1..aa83796 100644 --- a/src/delete.c +++ b/src/delete.c @@ -34,6 +34,49 @@ static void remove_rf(boolean do_umount) free(command); } } +static boolean has_default(char **def, int size) +{ + char *buf; + buf = malloc(1025); + char *buf_ptr; + FILE *fp = fopen(t_path.path, "r"); + if (fp) { + while (fgets(buf, 1024, fp)) { + if (strncmp(buf, "default:", 8) == 0) { + buf_ptr = index(buf,':'); + if (buf_ptr == NULL) { + break; + } + buf_ptr++; + if (size < strlen(buf_ptr)-1) { + bye("default buffer size is too small\n"); + } + memcpy(*def, buf_ptr, strlen(buf_ptr)-1); + fclose(fp); + free(buf); + return 0; + } + } + fclose(fp); + } + free(buf); + return 1; +} +static void reset_default(char *def_val) +{ + char *command; + boolean has_default = 1; + if (def_val == NULL) { + return; + } + if (has_default) { + touch(); + command = my_malloc(strlen(m_path.path) + 100, "set"); + sprintf(command, "echo %s > %s/node.val", def_val, m_path.path); + system(command); + free(command); + } +} /*************************************************** set_validate: validate value against definition @@ -139,6 +182,7 @@ int main(int argc, char **argv) fprintf(out_stream, "Nothing to delete\n"); bye("Nothing to delete at %s", m_path.path); } + remove_rf(FALSE); pop_path(&m_path); if ((dp = opendir(m_path.path)) == NULL){ @@ -187,7 +231,17 @@ int main(int argc, char **argv) } } /* else no defnition, remove it also */ - remove_rf(FALSE); + char *def_val; + def_val = malloc(1025); + if (has_default(&def_val,1024) == 0) { + reset_default(def_val); + free(def_val); + } + else { + remove_rf(FALSE); + } + + // remove_rf(FALSE); exit(0); } if(ai < argc -1 || last_tag) { @@ -267,6 +321,38 @@ int main(int argc, char **argv) remove_rf(FALSE); return 0; } + + /* + let's do a new check here: + -> if this is a leaf and there is a value look for a match of the value + -> make sure to check existing configuration as well as uncommitted config + */ + if (ai+1 == argc) { + //does this work up until the last value + pop_path(&m_path); + if(lstat(m_path.path, &statbuf) == 0) { + //now compare last value with that in the node.def file to determine whether to accept this delete + status = get_value(&cp, &m_path); + if (status != VTWERR_OK) { + bye("Cannot read old value %s\n", m_path.path); + } + if (!strcmp(cp,argv[argc - 1])) { + /* Also need to handle the case where the value is not specified. */ + char *def_val; + def_val = malloc(1025); + if (has_default(&def_val,1024) == 0) { + reset_default(def_val); + free(def_val); + } + else { + remove_rf(FALSE); + } + return 0; + } + } + } + + fprintf(out_stream, "The specified configuration node is not valid\n"); bye("There is no appropriate template for %s", m_path.path + strlen(get_mdirp())); diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index baf824b..4c311fc 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -1,6 +1,6 @@ tag: type: txt -help: Ethernet interface name +help: Set ethernet interface syntax:expression: exec " \ if [ -z \"`ip link | grep eth | egrep -v 'eth[0-9]+[.]' | grep $VAR(@)`\" ]; then \ echo Invalid ethernet interface [$VAR(@)]; \ diff --git a/templates/interfaces/ethernet/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/address/node.def index 23b1262..0ff02c8 100644 --- a/templates/interfaces/ethernet/node.tag/address/node.def +++ b/templates/interfaces/ethernet/node.tag/address/node.def @@ -1,11 +1,11 @@ multi: type: txt -help: Configure an IP address for this interface +help: Set an IP address for this interface syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)"; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" update:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; "Error setting address $VAR(@) on interface $VAR(../@)" delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)"; "Error deleting address $VAR(@) on interface $VAR(../@)" allowed: echo "dhcp <>" comp_help:Possible completions: - <IP address>/<prefix length>\tSet the IP address and prefix length - dhcp\t\t\t\tSet the IP address and prefix length via DHCP + <x.x.x.x/x> Set the IP address and prefix length + dhcp Set the IP address and prefix length via DHCP diff --git a/templates/interfaces/ethernet/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/description/node.def index 835ad40..aeb40f0 100644 --- a/templates/interfaces/ethernet/node.tag/description/node.def +++ b/templates/interfaces/ethernet/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description for this interface +help: Set description for this interface diff --git a/templates/interfaces/ethernet/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/disable/node.def index 9c795c6..54090cc 100644 --- a/templates/interfaces/ethernet/node.tag/disable/node.def +++ b/templates/interfaces/ethernet/node.tag/disable/node.def @@ -1,3 +1,3 @@ -help: Disable interface +help: Set interface disabled update:expression: "sudo ip link set $VAR(../@) down"; "Error disabling dev $VAR(../@)" delete:expression: "sudo ip link set $VAR(../@) up"; "Error enabling dev $VAR(../@)" diff --git a/templates/interfaces/ethernet/node.tag/hw-id/node.def b/templates/interfaces/ethernet/node.tag/hw-id/node.def index f25692d..6c559f8 100644 --- a/templates/interfaces/ethernet/node.tag/hw-id/node.def +++ b/templates/interfaces/ethernet/node.tag/hw-id/node.def @@ -1,2 +1,2 @@ type: macaddr -help: Specify the MAC address of this interface +help: Set the Media Access Control (MAC) address of this interface diff --git a/templates/interfaces/ethernet/node.tag/mac/node.def b/templates/interfaces/ethernet/node.tag/mac/node.def index d25b378..abafa7a 100644 --- a/templates/interfaces/ethernet/node.tag/mac/node.def +++ b/templates/interfaces/ethernet/node.tag/mac/node.def @@ -1,5 +1,5 @@ type: macaddr -help: Set the MAC address of this interface +help: Set the Media Access Control (MAC) address of this interface syntax:expression: exec "\ /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --valid-mac $VAR(@)" update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --set-mac $VAR(@) diff --git a/templates/interfaces/ethernet/node.tag/mtu/node.def b/templates/interfaces/ethernet/node.tag/mtu/node.def index c3b05a7..07c102a 100644 --- a/templates/interfaces/ethernet/node.tag/mtu/node.def +++ b/templates/interfaces/ethernet/node.tag/mtu/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the MTU for this interface +help: Set the Maximum Transmission Unit (MTU) for this interface syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "MTU must be between 68 and 9000" update:expression: "sudo ip link set $VAR(../@) mtu $VAR(@)"; "Error setting MTU on dev $VAR(../@)" delete:expression: "sudo ip link set $VAR(../@) mtu 1500"; "Error deleting MTU on dev $VAR(../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index 6a367f6..7ee3b50 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -1,6 +1,6 @@ tag: type: u32 -help: VLAN ID +help: Set Virtual Local Area Network (VLAN) ID syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" create:expression: "sudo modprobe 8021q"; "Error loading 802.1q driver" create:expression: "sudo vconfig add $VAR(../@) $VAR(@)"; "Error adding VLAN id $VAR(@) to dev $VAR(../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def index a33818f..cb9cedc 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def @@ -1,10 +1,10 @@ multi: type: txt -help: Configure an IP address for this interface +help: Set an IP address for this interface syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../../@).$VAR(../@) "; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)" create:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../../@).$VAR(../@) "; "Error setting address $VAR(@) on dev $VAR(../../@).$VAR(../@) " delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../../@).$VAR(../@) "; "Error deleting address $VAR(@) on dev $VAR(../../@).$VAR(../@) " allowed: echo "dhcp <>" comp_help:Possible completions: - <IP address>/<prefix length> Set the IP address and prefix length - dhcp Set the IP address and prefix length via DHCP + <x.x.x.x/x> Set the IP address and prefix length + dhcp Set the IP address and prefix length via DHCP diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def index 835ad40..aeb40f0 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description for this interface +help: Set description for this interface diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def index 3b2ae45..9599de3 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/disable/node.def @@ -1,3 +1,3 @@ -help: Disable interface +help: Set interface disabled update:expression: "sudo ip link set $VAR(../../@).$VAR(../@) down"; "Error disabling dev $VAR(../../@).$VAR(../@)" delete:expression: "sudo ip link set $VAR(../../@).$VAR(../@) up"; "Error enabling dev $VAR(../../@).$VAR(../@)" diff --git a/templates/interfaces/loopback/node.def b/templates/interfaces/loopback/node.def index 72888fc..7b7a304 100644 --- a/templates/interfaces/loopback/node.def +++ b/templates/interfaces/loopback/node.def @@ -1,6 +1,6 @@ tag: type: txt -help: Loopback interface name +help: Set loopback interface syntax:expression: exec " \ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ echo loopback interface $VAR(@) doesn\\'t exist on this system ; \ diff --git a/templates/interfaces/loopback/node.tag/address/node.def b/templates/interfaces/loopback/node.tag/address/node.def index 793c52c..03ead09 100644 --- a/templates/interfaces/loopback/node.tag/address/node.def +++ b/templates/interfaces/loopback/node.tag/address/node.def @@ -1,6 +1,6 @@ multi: type: txt -help: Configure an IP address for this interface +help: Set an IP address for this interface syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)"; \ "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" @@ -11,4 +11,4 @@ delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete "Error deleting address $VAR(@) on interface $VAR(../@)" comp_help:Possible completions: - <IP address>/<prefix length>\tSet the IP address and prefix length + <x.x.x.x/x> Set the IP address and prefix length diff --git a/templates/interfaces/loopback/node.tag/description/node.def b/templates/interfaces/loopback/node.tag/description/node.def index 835ad40..aeb40f0 100644 --- a/templates/interfaces/loopback/node.tag/description/node.def +++ b/templates/interfaces/loopback/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description for this interface +help: Set description for this interface diff --git a/templates/interfaces/node.def b/templates/interfaces/node.def index 7ab9990..5865af5 100644 --- a/templates/interfaces/node.def +++ b/templates/interfaces/node.def @@ -1 +1 @@ -help: Network interface configuration +help: Configure network interfaces |