To find out which interfaces exist, it does
if [ "$iname" = "modem" ]; then RAIC="$RAIC `cd /proc/sys/net/ipv4/conf; echo ppp* `" else RAIC="$RAIC $iname" fi
...which results in the "ppp*" string if there is no interface named ppp* present. The script is written for very fast execution, and echo <pattern> is much faster than an ls <pattern>.
Hmm, am I missing something or could you just do something like R="`cd /proc/sys/net/ipv4/conf; echo ppp* `" test "$R" = "ppp*" && R="" RAIC="$RAIC $R" with the shell? A bit of string comparison is not exactly CPU-intensive and handled by the shell without external programs. Volker -- Volker Kuhlmann is possibly list0570 with the domain in header http://volker.orcon.net.nz Please do not CC list postings to me.