1 Index: rc.d/init.d/network
2 ===================================================================
3 --- rc.d/init.d/network (revision 7128)
4 +++ rc.d/init.d/network (revision 7131)
9 -# find all the interfaces besides loopback.
10 -# ignore aliases, alternative configurations, and editor backup files
11 -if [ -n "$(grep "^BOOTPRIO=" /etc/sysconfig/interfaces/ifcfg* 2> /dev/null)" ]; then
12 - interfaces_boot=$(( \
13 - . /etc/rc.d/init.d/functions; \
14 - cd /etc/sysconfig/interfaces; \
15 - egrep 'BOOTPRIO' ifcfg* | sort -t= -n -k2,2 | \
16 - awk ' { gsub(/:BOOTPRIO.*/,NIL); print $0 } '| egrep -v 'ifcfg-lo' | \
17 - for i in `cat`; do \
18 - ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
19 - is_yes "$ONBOOT" && echo "$i"; \
21 - awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
22 +# Get list of interface configs
23 +# ignores editor backup files and rpm blackups
24 +network_interface_configs()
27 + for a in /etc/sysconfig/interfaces/$match; do
29 + *rpmorig|*rpmnew|*rpmsave|*~|*.orig)
39 +ifcfg_files="$(network_interface_configs 'ifcfg-*')"
41 +if [ -n "$bootprio" ]; then
42 + # find all the interfaces besides loopback.
44 + for a in $(echo "$bootprio" | sort -t= -n -k2,2); do
47 + *ifcfg-lo) continue ;;
49 + ONBOOT=""; . "$i" 2>/dev/null
50 + is_yes "$ONBOOT" && echo "${i##*/}"
55 - . /etc/rc.d/init.d/functions; \
56 - cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
57 - egrep -v '(ifcfg-lo|ifcfg-sit|ifcfg-atm|ifcfg-lec|ifcfg-nas|ifcfg-br|ifcfg-(.*)\.(.*))' | \
58 - LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
59 - for i in `cat`; do \
60 - ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
61 - is_yes "$ONBOOT" && echo "$i"; \
63 - awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
64 - interfaces_vlan_boot=$((
65 - . /etc/rc.d/init.d/functions; \
66 - cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
67 - egrep 'ifcfg-(.*)\.(.*)' | \
68 - LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
69 - for i in `cat`; do \
70 - ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
71 - is_yes "$ONBOOT" && echo "$i"; \
73 - awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
74 - interfaces_br_boot=$((
75 - . /etc/rc.d/init.d/functions; \
76 - cd /etc/sysconfig/interfaces && ls -1 ifcfg-br* | \
77 - LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
78 - for i in `cat`; do \
79 - ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
80 - is_yes "$ONBOOT" && echo "$i"; \
82 - awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
83 - interfaces_sit_boot=$((
84 - . /etc/rc.d/init.d/functions; \
85 - cd /etc/sysconfig/interfaces && ls -1 ifcfg-sit* | \
86 - LC_ALL=C egrep 'ifcfg-[a-z0-9]+$' | \
87 - for i in `cat`; do \
88 - ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
89 - is_yes "$ONBOOT" && echo "$i"; \
91 - awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
93 + for i in $ifcfg_files; do
95 + ifcfg-lo|ifcfg-sit|ifcfg-atm|ifcfg-lec|ifcfg-nas|ifcfg-br|ifcfg-*.*) continue ;;
97 + ONBOOT=""; . "$i" 2>/dev/null
98 + is_yes "$ONBOOT" && echo "${i##*/}"
102 + interfaces_vlan_boot=`
103 + for i in $ifcfg_files; do
108 + ONBOOT=""; . "$i" 2>/dev/null
109 + is_yes "$ONBOOT" && echo "${i##*/}"
113 + interfaces_br_boot=`
114 + for i in $ifcfg_files; do
119 + ONBOOT=""; . "$i" 2>/dev/null
120 + is_yes "$ONBOOT" && echo "${i##*/}"
124 + interfaces_sit_boot=`
125 + for i in $ifcfg_files; do
130 + ONBOOT=""; . "$i" 2>/dev/null
131 + is_yes "$ONBOOT" && echo "${i##*/}"
135 -tunnels=$((cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | \
136 - xargs egrep -l "ONBOOT=[^n][^o]" | \
137 - LC_ALL=C egrep 'tnlcfg-[a-z0-9]+$' | \
138 - awk ' { gsub(/tnlcfg-/,NIL); print $0 } ') 2> /dev/null)
141 + for i in $(network_interface_configs 'tnlcfg-*'); do
142 + ONBOOT=""; . "$i" 2>/dev/null
143 + is_yes "$ONBOOT" && echo "${i##*/}"
147 # See how we were called.
150 - rc_splash "bootnetwork start"
152 if is_yes "$VSERVER"; then
153 touch /var/lock/subsys/network
157 + rc_splash "bootnetwork start"
160 for i in $interfaces_boot $interfaces_vlan_boot $interfaces_sit_boot ; do