#
# probe: true
-# $Id: network,v 1.38 2000/11/06 15:42:19 baggins Exp $
+# $Id: network,v 1.39 2000/11/06 16:24:46 baggins Exp $
# NLS
NLS_DOMAIN="rc-scripts"
# find all the interfaces besides loopback.
# ignore aliases, alternative configurations, and editor backup files
-interfaces="`(ls /etc/sysconfig/interfaces/ifcfg* | \
-egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$' | \
-sed 's!^/etc/sysconfig/interfaces/ifcfg-!!g') 2> /dev/null`"
-
-interfaces_boot="`(alias xx="ls /etc/sysconfig/interfaces/ifcfg* |\
-egrep -v '(ifcfg-lo|ifcfg-sit|ifcfg-lec|ifcfg-atm|:)' | egrep 'ifcfg-[a-z0-9]+$'" ; \
-for i in \`xx\`; do ONBOOT=""; . $i; if is_yes "$ONBOOT"; then \
-echo $i; fi; done | sed 's!^/etc/sysconfig/interfaces/ifcfg-!!g') 2> /dev/null`"
-
-interfaces_sit_boot="`(alias xx="ls /etc/sysconfig/interfaces/ifcfg-sit* | \
-egrep 'ifcfg-[a-z0-9]+$'"; for i in \`xx\`; do ONBOOT=""; . $i; \
-if is_yes "$ONBOOT"; then echo $i; fi; done | \
-sed 's!^/etc/sysconfig/interfaces/ifcfg-!!g') 2> /dev/null`"
-
-tunnels="`(alias xx="ls /etc/sysconfig/interfaces/tnlcfg-*"; \
-for i in \`xx\`; do ONBOOT=""; . $i; if is_yes "$ONBOOT"; then echo $i; \
-fi; done | sed 's!^/etc/sysconfig/interfaces/tnlcfg-!!g') 2> /dev/null`"
+interfaces=$((cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
+ egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$' | \
+ awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+interfaces_boot=$((cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
+ egrep -v '(ifcfg-lo|ifcfg-sit|ifcfg-atm|ifcfg-lec|:)' | egrep 'ifcfg-[a-z0-9]+$' | \
+ xargs egrep -l "ONBOOT=[^n][^o]" | \
+ awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+interfaces_sit_boot=$((cd /etc/sysconfig/interfaces && ls -1 ifcfg-sit* | \
+ egrep 'ifcfg-[a-z0-9]+$' | xargs egrep -l "ONBOOT=[^n][^o]" | \
+ awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+tunnels=$((cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | \
+ xargs egrep -l "ONBOOT=[^n][^o]" | \
+ awk ' { gsub(/tnlcfg-/,NIL); print $0 } ') 2> /dev/null)
# See how we were called.
case "$1" in