From bac3ac51227d183c04bf1890af2319fb40534996 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 22 Nov 1999 20:47:09 +0000 Subject: *** empty log message *** --- ChangeLog | 6 +++ initscripts.spec | 2 +- sysconfig/network-scripts/ifup-aliases | 79 ++++++++++++++-------------------- 3 files changed, 40 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f4f5d6a..8a31d273 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-11-22 Bill Nottingham + * sysconfig/network-scripts/ifup-aliases: + call linuxconf for linuxconf aliases + + * lang.csh, lang.sh: + turn off executable bit + * rc.d/rc.sysinit: load mixer settings for monolithic sound too diff --git a/initscripts.spec b/initscripts.spec index 6a04eba7..1bf12190 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -1,6 +1,6 @@ Summary: The inittab file and the /etc/rc.d scripts. Name: initscripts -%define version 4.66 +%define version 4.67 Version: %{version} Copyright: GPL Group: System Environment/Base diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases index 48680b2b..f65d5956 100755 --- a/sysconfig/network-scripts/ifup-aliases +++ b/sysconfig/network-scripts/ifup-aliases @@ -289,51 +289,38 @@ function new_interface () if [ "$BASH_VERSINFO" ]; then shopt -s nullglob; else allow_null_glob_expansion=foo; fi -# This is for linuxconf-style alias files. -aliasnum=0 +# Is there any linuxconf-style alias files. +linuxconfstyle=0 for FILE in ifcfg-${parent_device}:* ; do ini_env; . $FILE; if [ -z "$DEVICE" ]; then - # Eek, it's a linuxconf file. - - for address in $IPADDR; do - if echo $address | grep -q '-' ; then - IPADDR_START=${address%-*} - ipaddr_prefix=${IPADDR_START%.*} - ipaddr_startnum=${IPADDR_START##*.} - IPADDR_END="${ipaddr_prefix}.${address##*-}" - ipaddr_endnum=${IPADDR_END##*.} - - if [ "${IPADDR_START%.*}" != "${IPADDR_END%.*}" ]; then - echo "error in $FILE: IPADDR_START and IPADDR_END don't argree" >&2; exit 0 - fi - - if [ $ipaddr_startnum -gt $ipaddr_endnum ]; then - echo "error in $FILE: IPADDR_START greater than IPADDR_END" >&2; exit 0 - fi - - ipaddr_num=$ipaddr_startnum - - while [ $ipaddr_num -le $ipaddr_endnum ]; do - IPADDR="$ipaddr_prefix.$ipaddr_num" - DEVICE="$parent_device:$aliasnum" - new_interface; - let 'ipaddr_num=ipaddr_num+1' - let 'aliasnum=aliasnum+1' - done - else - DEVICE="${parent_device}:${aliasnum}" - IPADDR=$address - new_interface; - let 'aliasnum=aliasnum+1' - fi - done + # it's a linuxconf file. + # I don't think this script will handle both style correctly + # though. Well, those who knows about the other style don't know + # the other style and vice versa + linuxconfstyle=1 else new_interface; fi done +if [ "$linuxconfstyle" = "1" ] ; then + linuxconf --hint ipalias $device \ + | while read command ali ip mask bcast + do + if [ "$command" = "del" ] ; then + /sbin/ifconfig $ali down + do_netreport=yes + elif [ "$command" = "add" ] ; then + /sbin/ifconfig $ali $ip netmask $mask broadcast $bcast + do_netreport=yes + else + echo Incomatible hinting: $command $rest >&2 + fi + done +fi + for FILE in ifcfg-${parent_device}-range* ; do @@ -368,16 +355,16 @@ done # # Remove any devices that should not be around # - -for DEVNUM in $rdev_LIST ; do - eval " rdev_mark=\$rdev_${DEVNUM}_mark "; - if [ -z "$rdev_mark" ]; then -##echo "removing device $parent_device:${DEVNUM} (lingering)" - /sbin/ifconfig $parent_device:${DEVNUM} down - do_netreport=yes - fi -done - +if [ "$linuxconfstyle" = "0" ] ; then + for DEVNUM in $rdev_LIST ; do + eval " rdev_mark=\$rdev_${DEVNUM}_mark "; + if [ -z "$rdev_mark" ]; then + ##echo "removing device $parent_device:${DEVNUM} (lingering)" + /sbin/ifconfig $parent_device:${DEVNUM} down + do_netreport=yes + fi + done +fi # # Notify of new device creation # -- cgit v1.2.1