diff options
author | Bill Nottingham <notting@redhat.com> | 2002-02-07 03:08:54 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2002-02-07 03:08:54 +0000 |
commit | 16dfcaa36f7378fd5b4ab9663461db7e16f5b19e (patch) | |
tree | c4ae8101a862d761a630eba0634df8a031a27ff6 | |
parent | 214433262978da777a33b1f0d34f85df1664df8d (diff) | |
download | initscripts-16dfcaa36f7378fd5b4ab9663461db7e16f5b19e.tar initscripts-16dfcaa36f7378fd5b4ab9663461db7e16f5b19e.tar.gz initscripts-16dfcaa36f7378fd5b4ab9663461db7e16f5b19e.tar.bz2 initscripts-16dfcaa36f7378fd5b4ab9663461db7e16f5b19e.tar.xz initscripts-16dfcaa36f7378fd5b4ab9663461db7e16f5b19e.zip |
don't loop on bad HWADDR settings (#52285)
don't blowaway pumpargs/dhcpcdargs if they pass in a hostname (#57927, <Olivier.Baudron@ens.fr>)
-rwxr-xr-x | sysconfig/network-scripts/ifup | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index b1c4d275..cd2c2286 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -98,11 +98,11 @@ if [ -n "${HWADDR}" ]; then sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'` if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then NEWCONFIG=`fgrep -l "HWADDR=${HWADDR}" /etc/sysconfig/network-scripts/ifcfg-*` - if [ -n "${NEWCONFIG}" ]; then + if [ -n "${NEWCONFIG}" -a "`basename ${NEWCONFIG}`" != "${CONFIG}" ]; then exec /sbin/ifup ${NEWCONFIG} fi NEWCONFIG=`fgrep -l "HWADDR=${HWADDR}" /etc/sysconfig/networking/default/ifcfg-*` - if [ -n "${NEWCONFIG}" ]; then + if [ -n "${NEWCONFIG}" -a "`basename ${NEWCONFIG}`" != "${CONFIG}" ]; then exec /sbin/ifup ${NEWCONFIG} else echo $"Device ${DEVICE} has different MAC address than expected, ignoring." @@ -148,8 +148,8 @@ if [ -n "${DYNCONFIG}" ]; then PUMPARGS=$PUMPARGS DHCPCDARGS="$DHCPCDARGS -n" if [ -n "${DHCP_HOSTNAME}" ]; then - PUMPARGS="-h ${DHCP_HOSTNAME}" - DHCPCDARGS="-h ${DHCP_HOSTNAME}" + PUMPARGS="${PUMPARGS} -h ${DHCP_HOSTNAME}" + DHCPCDARGS="${DHCPCDARGS} -h ${DHCP_HOSTNAME}" fi if [ -n "${NEEDHOSTNAME}" ]; then PUMPARGS="${PUMPARGS} --lookup-hostname" |