]> git.pld-linux.org Git - packages/rc-scripts.git/commitdiff
- network service fixes from svn
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 9 Mar 2006 19:46:43 +0000 (19:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rc-scripts-branch.patch -> 1.1

rc-scripts-branch.patch [new file with mode: 0644]

diff --git a/rc-scripts-branch.patch b/rc-scripts-branch.patch
new file mode 100644 (file)
index 0000000..57f912d
--- /dev/null
@@ -0,0 +1,160 @@
+Index: rc.d/init.d/network
+===================================================================
+--- rc.d/init.d/network        (revision 7128)
++++ rc.d/init.d/network        (revision 7131)
+@@ -119,74 +119,98 @@
+ set_down_loopback
+ }
+-# find all the interfaces besides loopback.
+-# ignore aliases, alternative configurations, and editor backup files
+-if [ -n "$(grep "^BOOTPRIO=" /etc/sysconfig/interfaces/ifcfg* 2> /dev/null)" ]; then
+-      interfaces_boot=$(( \
+-              . /etc/rc.d/init.d/functions; \
+-              cd /etc/sysconfig/interfaces; \
+-              egrep 'BOOTPRIO' ifcfg* | sort -t= -n -k2,2 | \
+-              awk ' { gsub(/:BOOTPRIO.*/,NIL); print $0 } '| egrep -v 'ifcfg-lo' | \
+-              for i in `cat`; do \
+-                      ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
+-                      is_yes "$ONBOOT" && echo "$i"; \
+-              done | \
+-              awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
++# Get list of interface configs
++# ignores editor backup files and rpm blackups
++network_interface_configs()
++{
++      local match="$1"
++      for a in /etc/sysconfig/interfaces/$match; do
++              case "$a" in
++              *rpmorig|*rpmnew|*rpmsave|*~|*.orig)
++                      continue
++                      ;;
++              *)
++                      echo $a
++              ;;
++              esac
++      done
++}
++
++ifcfg_files="$(network_interface_configs 'ifcfg-*')"
++
++if [ -n "$bootprio" ]; then
++      # find all the interfaces besides loopback.
++      interfaces_boot=`
++              for a in $(echo "$bootprio" | sort -t= -n -k2,2); do
++                      i="${a%:BOOTPRIO*}"
++                      case $i in
++                              *ifcfg-lo) continue ;;
++                      esac
++                      ONBOOT=""; . "$i" 2>/dev/null
++                      is_yes "$ONBOOT" && echo "${i##*/}"
++              done
++      `
+ else
+-      interfaces_boot=$((
+-              . /etc/rc.d/init.d/functions; \
+-              cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
+-              egrep -v '(ifcfg-lo|ifcfg-sit|ifcfg-atm|ifcfg-lec|ifcfg-nas|ifcfg-br|ifcfg-(.*)\.(.*))' | \
+-              LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
+-              for i in `cat`; do \
+-                      ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
+-                      is_yes "$ONBOOT" && echo "$i"; \
+-              done | \
+-              awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+-      interfaces_vlan_boot=$((
+-              . /etc/rc.d/init.d/functions; \
+-              cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
+-              egrep 'ifcfg-(.*)\.(.*)' | \
+-              LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
+-              for i in `cat`; do \
+-                      ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
+-                      is_yes "$ONBOOT" && echo "$i"; \
+-              done | \
+-              awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+-      interfaces_br_boot=$((
+-              . /etc/rc.d/init.d/functions; \
+-              cd /etc/sysconfig/interfaces && ls -1 ifcfg-br* | \
+-              LC_ALL=C egrep 'ifcfg-[a-z0-9\.]+$' | \
+-              for i in `cat`; do \
+-                      ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
+-                      is_yes "$ONBOOT" && echo "$i"; \
+-              done | \
+-              awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+-      interfaces_sit_boot=$((
+-              . /etc/rc.d/init.d/functions; \
+-              cd /etc/sysconfig/interfaces && ls -1 ifcfg-sit* | \
+-              LC_ALL=C egrep 'ifcfg-[a-z0-9]+$' | \
+-              for i in `cat`; do \
+-                      ONBOOT=""; . /etc/sysconfig/interfaces/"$i"; \
+-                      is_yes "$ONBOOT" && echo "$i"; \
+-              done | \
+-              awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
++      interfaces_boot=`
++              for i in $ifcfg_files; do
++                      case ${i##*/} in
++                              ifcfg-lo|ifcfg-sit|ifcfg-atm|ifcfg-lec|ifcfg-nas|ifcfg-br|ifcfg-*.*) continue ;;
++                      esac
++                      ONBOOT=""; . "$i" 2>/dev/null
++                      is_yes "$ONBOOT" && echo "${i##*/}"
++              done
++      `
++
++      interfaces_vlan_boot=`
++              for i in $ifcfg_files; do
++                      case ${i##*/} in
++                              ifcfg-*.*) ;;
++                              *) continue ;;
++                      esac
++                      ONBOOT=""; . "$i" 2>/dev/null
++                      is_yes "$ONBOOT" && echo "${i##*/}"
++              done
++      `
++
++      interfaces_br_boot=`
++              for i in $ifcfg_files; do
++                      case ${i##*/} in
++                              ifcfg-br*) ;;
++                              *) continue ;;
++                      esac
++                      ONBOOT=""; . "$i" 2>/dev/null
++                      is_yes "$ONBOOT" && echo "${i##*/}"
++              done
++      `
++
++      interfaces_sit_boot=`
++              for i in $ifcfg_files; do
++                      case ${i##*/} in
++                              ifcfg-sit*) ;;
++                              *) continue ;;
++                      esac
++                      ONBOOT=""; . "$i" 2>/dev/null
++                      is_yes "$ONBOOT" && echo "${i##*/}"
++              done
++      `
+ fi
+-tunnels=$((cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | \
+-      xargs egrep -l "ONBOOT=[^n][^o]" | \
+-      LC_ALL=C egrep 'tnlcfg-[a-z0-9]+$' | \
+-      awk ' { gsub(/tnlcfg-/,NIL); print $0 } ') 2> /dev/null)
++tunnels=`
++      for i in $(network_interface_configs 'tnlcfg-*'); do
++              ONBOOT=""; . "$i" 2>/dev/null
++              is_yes "$ONBOOT" && echo "${i##*/}"
++      done
++`
++
+ # See how we were called.
+ case "$1" in
+   start)
+-      rc_splash "bootnetwork start"
+-
+       if is_yes "$VSERVER"; then
+               touch /var/lock/subsys/network
+               exit 0
+       fi
++      rc_splash "bootnetwork start"
+       network_init
+       for i in $interfaces_boot $interfaces_vlan_boot $interfaces_sit_boot ; do
This page took 0.038502 seconds and 4 git commands to generate.