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