<[email protected]> wrote
  in <[email protected]>:

dt> > +list_vars()
dt> > +{
dt> > + set | { while read LINE; do
dt> > +         var="${LINE%%=*}"
dt> > +         case "$var" in
dt> > +         "$LINE"|*[!a-zA-Z0-9_]*) continue ;;
dt> > +         $1) echo $var
dt> > +         esac
dt> > + done; }
dt> > +}
dt> >
dt> >  This can be inconsistent with normalization of $_if in get_if_var()  when
dt> [.-/+]
dt> > is included.
dt> >
dt> [Devin Teske]
dt>
dt> I'm not sure what you mean by "when [.-/+] is included". The line of code

 get_if_var() normalizes IF part in the variable name before eval:

 |       _if=$1
 |       _punct=". - / +"
 |       for _punct_c in $_punct; do
 |               _if=`ltr ${_if} ${_punct_c} '_'`
 |       done

 while list_vars ifconfig_${_if}_alias[0-9]\* does not.

 I think this breaks the following configuration, for example:

 ifconfig_bge0_name="ext.1"
 ifconfig_ext_1="inet 192.168.0.1/24"
 ifconfig_ext_1_alias0="inet 192.168.1.1/24"

-- Hiroki

Attachment: pgpxwLm24ViQv.pgp
Description: PGP signature

Reply via email to