- modify network into RedHat style to work with NetworkManager ifcfg-rh plugin:
* use /etc/sysconfig/network-scripts instead of /etc/sysconfig/network-devices * use ifcfg-* interface configuration files instead of ifconfig.*
This commit is contained in:
parent
906caeb7ae
commit
bf8757b8e2
@ -1,3 +1,9 @@
|
||||
Changes in version 1.5.1 <silvan.calarco@mambasoft.it> 20110427
|
||||
- modify network into RedHat style to work with NetworkManager ifcfg-rh plugin:
|
||||
* use /etc/sysconfig/network-scripts instead of /etc/sysconfig/network-devices
|
||||
* use ifcfg-* interface configuration files instead of ifconfig.*
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Changes in version 1.5.0 <silvan.calarco@mambasoft.it> 20110406
|
||||
- Integrate patches by Dabive Madrisan for dash compatibility and cleanups:
|
||||
* dash compatibility (functions,rc): sourced script with arguments
|
||||
|
8
Makefile
8
Makefile
@ -61,7 +61,7 @@ install-dirs:
|
||||
$(INSTALL_DIR) $(DESTDIR)/sbin
|
||||
$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/run
|
||||
$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/log
|
||||
$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir)/modules.d/
|
||||
$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/modules.d/
|
||||
|
||||
install-files:
|
||||
touch $(DESTDIR)$(localstatedir)/run/utmp
|
||||
@ -83,9 +83,11 @@ dist: clean
|
||||
echo "ChangeLog not updated; not releasing" 1>&2;\
|
||||
exit 1;; \
|
||||
esac
|
||||
@mkdir /tmp/$(distdir)
|
||||
@cp -a * /tmp/$(distdir)/
|
||||
@rm -f $(dist_archive);\
|
||||
tar cf - --exclude=$(PACKAGE)*.bz2 -C .. $(distdir) |\
|
||||
bzip2 -9 -c > $(dist_archive)
|
||||
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
|
||||
@rm -rf /tmp/$(distdir)
|
||||
@echo "file \`$(dist_archive)' created"
|
||||
|
||||
dist-rpm: dist
|
||||
|
@ -26,8 +26,8 @@ case "$1" in
|
||||
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/network_makefile_$$
|
||||
trap "rm -f $tempfile" HUP INT QUIT ABRT KILL TERM
|
||||
|
||||
for file in `grep -il "ONBOOT=yes" $network_devices/ifconfig.* 2>/dev/null`; do
|
||||
interface=$(basename $file | sed "s/ifconfig.//")
|
||||
for file in `grep -il "ONBOOT=yes" $network_devices/ifcfg-* 2>/dev/null`; do
|
||||
interface=$(basename $file | sed "s/ifcfg.//")
|
||||
case "$interface" in
|
||||
*~) ;;
|
||||
*) parentinterface=$(echo $interface | sed s/:.*// )
|
||||
@ -58,8 +58,8 @@ EOF
|
||||
evaluate_retval
|
||||
echo
|
||||
fi
|
||||
for file in `grep -il "ONBOOT=yes" $network_devices/ifconfig.* 2>/dev/null`; do
|
||||
interface=$(basename $file | sed s/ifconfig.//)
|
||||
for file in `grep -il "ONBOOT=yes" $network_devices/ifcfg-* 2>/dev/null`; do
|
||||
interface=$(basename $file | sed s/ifcfg-//)
|
||||
case "$interface" in
|
||||
*~) ;;
|
||||
*) echo -n $"Bringing down the $interface interface: "
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# network-functions: Network functions script for openmamba
|
||||
#
|
||||
# Copyright (c) 2003-2005 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2003-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2003-2005,2011 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
@ -146,8 +146,8 @@ get_interface_parameters ()
|
||||
|
||||
int_static_ip=1
|
||||
# this check was written to avoid backward compatibility issues
|
||||
if [ -r $network_devices/ifconfig.$int_name ]; then
|
||||
if grep -Eq "^BOOTPROTO=dhcp" $network_devices/ifconfig.$int_name; then
|
||||
if [ -r $network_devices/ifcfg-$int_name ]; then
|
||||
if grep -Eq "^BOOTPROTO=dhcp" $network_devices/ifcfg-$int_name; then
|
||||
int_static_ip=0
|
||||
fi
|
||||
fi
|
||||
|
@ -2,7 +2,7 @@ rc_base=/etc/rc.d
|
||||
rc_functions=$rc_base/init.d/functions
|
||||
rc_networkfunctions=$rc_base/init.d/network-functions
|
||||
|
||||
network_devices=/etc/sysconfig/network-devices
|
||||
network_devices=/etc/sysconfig/network-scripts
|
||||
|
||||
# multithread = 0: enable standard PosiX SysV5 init
|
||||
# multithread = 1: enable fast openamba multithreaded init
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2003-2009 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2003-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2003-2009 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
@ -9,8 +9,8 @@ DEVICE=${1}
|
||||
|
||||
[ "${DEVICE}" ] || exit 1
|
||||
|
||||
[ -r $network_devices/ifconfig.${DEVICE} ] &&
|
||||
. $network_devices/ifconfig.${DEVICE}
|
||||
[ -r $network_devices/ifcfg-${DEVICE} ] &&
|
||||
. $network_devices/ifcfg-${DEVICE}
|
||||
|
||||
if [ -x $network_devices/ifdown-${DEVICE} ]; then
|
||||
$network_devices/ifdown-${DEVICE}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2003-2009 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2003-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2003-2009 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
@ -11,7 +11,7 @@ DEVICE=${1}
|
||||
[ "${DEVICE}" ] || exit 1
|
||||
|
||||
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
|
||||
[ -r $network_devices/ifconfig.${DEVICE} ] && . $network_devices/ifconfig.${DEVICE}
|
||||
[ -r $network_devices/ifcfg-${DEVICE} ] && . $network_devices/ifcfg-${DEVICE}
|
||||
|
||||
[ "$2" = "--udev" -a "$ONBOOT" != "yes" -a "$ONBOOT" != "1" -a "$ONBOOT" != "true" ] \
|
||||
&& exit 0
|
||||
@ -42,7 +42,7 @@ else
|
||||
if [ "$IPADDR" ]; then
|
||||
if [ -z "$NETMASK" ]; then
|
||||
echo "\
|
||||
NETMASK variable missing in ifconfig.${DEVICE}, echo using 255.255.255.0"
|
||||
NETMASK variable missing in ifcfg-${DEVICE}, echo using 255.255.255.0"
|
||||
NETMASK=255.255.255.0
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user