aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael K. Johnson <johnsonm@redhat.com>1998-05-03 01:35:48 +0000
committerMichael K. Johnson <johnsonm@redhat.com>1998-05-03 01:35:48 +0000
commit3f1835cd8915c0bd76ade5dbeed29992296bce61 (patch)
tree3928fbbb3f9e4a67a5c89d80c629686b80acb7b8
parentb7ef7c3cd0bcce1c4d77694be607b6b8d81fcc58 (diff)
downloadinitscripts-3f1835cd8915c0bd76ade5dbeed29992296bce61.tar
initscripts-3f1835cd8915c0bd76ade5dbeed29992296bce61.tar.gz
initscripts-3f1835cd8915c0bd76ade5dbeed29992296bce61.tar.bz2
initscripts-3f1835cd8915c0bd76ade5dbeed29992296bce61.tar.xz
initscripts-3f1835cd8915c0bd76ade5dbeed29992296bce61.zip
update to linuxconf 1.11r8 capabilities.
Full support for IPX as configured by linuxconf. Updated sysconfig.txt documentation to reflect new parameters.
-rwxr-xr-xrc.d/init.d/network40
-rw-r--r--sysconfig.txt30
-rwxr-xr-xsysconfig/network-scripts/ifup6
-rwxr-xr-xsysconfig/network-scripts/ifup-ipx44
-rwxr-xr-xsysconfig/network-scripts/ifup-routes2
5 files changed, 116 insertions, 6 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index dcf70b91..4d0c764b 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -26,6 +26,9 @@ fi
[ -x /sbin/ifconfig ] || exit 0
+# Even if IPX is configured, without the utilities we can't do much
+[ ! -x /usr/bin/ipx_internal_net -o ! -x /usr/bin/ipx_configure ] && IPX=
+
cd /etc/sysconfig/network-scripts
# find all the interfaces besides loopback.
@@ -68,6 +71,15 @@ case "$1" in
ipv4_forward_set
./ifup ifcfg-lo
+
+ case "$IPX" in
+ yes|true)
+ /usr/bin/ipx_configure --auto_primary=$IPXAUTOPRIMARY \
+ --auto_interface=$IPXAUTOFRAME
+ /usr/bin/ipx_internal_net add $IPXINTERNALNETNUM $IPXINTERNALNODENUM
+ ;;
+ esac
+
for i in $interfaces; do
./ifup $i boot
done
@@ -78,6 +90,11 @@ case "$1" in
for i in $interfaces; do
./ifdown $i boot
done
+ case "$IPX" in
+ yes|true)
+ /usr/bin/ipx_internal_net del
+ ;;
+ esac
./ifdown ifcfg-lo
echo "Disabling IPv4 packet forwarding."
echo 0 > /proc/sys/net/ipv4/ip_forward
@@ -124,6 +141,23 @@ case "$1" in
for device in $DEV_RECONF_ROUTES ; do
/etc/sysconfig/network-scripts/ifup-routes $device
done
+ case $IPX in yes|true)
+ case $IPXINTERNALNET in
+ reconf)
+ /usr/bin/ipx_internal_net del
+ /usr/bin/ipx_internal_net add $IPXINTERNALNETNUM \
+ $IPXINTERNALNODENUM
+ ;;
+ add)
+ /usr/bin/ipx_internal_net add $IPXINTERNALNETNUM \
+ $IPXINTERNALNODENUM
+ ;;
+ del)
+ /usr/bin/ipx_internal_net del
+ ;;
+ esac
+ ;;
+ esac
else
$0 restart
fi
@@ -132,13 +166,15 @@ case "$1" in
if [ -x /bin/linuxconf ] ; then
eval `/bin/linuxconf --hint netdev`
[ -n "$DEV_UP$DEV_DOWN$DEV_RECONF$DEV_RECONF_ALIASES" -o \
- -n "$DEV_RECONF_ROUTES" -o \
+ -n "$DEV_RECONF_ROUTES$IPXINTERNALNET" -o \
"$RECONF_IPV4ROUTING" = yes ] && \
echo reload
exit 0
else
# if linuxconf isn't around to figure stuff out for us,
- # we punt.
+ # we punt. Probably better than completely reloading
+ # networking if user isn't sure which to do. If user
+ # is sure, they would run restart or reload, not probe.
exit 0
fi
;;
diff --git a/sysconfig.txt b/sysconfig.txt
index ddae4457..5002179c 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -48,6 +48,13 @@ Files in /etc/sysconfig
GATEWAY=<gateway IP>
GATEWAYDEV=<gateway device> (e.g. eth0)
NISDOMAIN=<nis domain name>
+ IPX=yes|no
+ IPXAUTOPRIMARY=on|off (note, that MUST be on|off, not yes|no)
+ IPXAUTOFRAME=on|off (again, not yes|no)
+ IPXINTERNALNETNUM=<netnum>
+ IPXINTERNALNODENUM=<nodenum>
+
+ All the IPX stuff is optional, and should default to off.
/etc/sysconfig/static-routes:
@@ -59,6 +66,11 @@ Files in /etc/sysconfig
down with the device, or "any" to have the correct devices calculated
at run time.
+/etc/sysconfig/routed:
+
+ SILENT=yes|no
+ EXPORT_GATEWAY=yes|no
+
/etc/sysconfig/pcmcia:
PCMCIA=yes|no
@@ -186,6 +198,11 @@ Files in /etc/sysconfig/network-scripts/
NETWORK=<will be calculated automatically with ifcalc>
BROADCAST=<will be calculated automatically with ifcalc>
+ Ethernet-only items:
+ {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP}
+ configuration matrix for IPX. Only used if IPX is active.
+ Managed from /etc/sysconfig/network-scripts/ifup-ipx
+
PPP/SLIP items:
PERSIST=yes|no
MODEMPORT=<device, say /dev/modem>
@@ -245,8 +262,9 @@ Files in /etc/sysconfig/network-scripts/
Called when any network device EXCEPT a SLIP device comes
up. Calls /etc/sysconfig/network-scripts/ifup-routes to
- bring up static routes that depend on that device. Brings
- up aliases for that device. Sets the hostname if it is not
+ bring up static routes that depend on that device. Calls
+ /etc/sysconfig/network-scripts/ifup-aliases to bring up
+ aliases for that device. Sets the hostname if it is not
already set and a hostname can be found for the IP for that
device. Sends SIGIO to any programs that have requested
notification of network events.
@@ -254,6 +272,14 @@ Files in /etc/sysconfig/network-scripts/
Could be extended to fix up nameservice configuration, call
arbitrary scripts, etc, as needed.
+/etc/sysconfig/network-scripts/ifup-routes
+
+ Set up static routes for a device.
+
+/etc/sysconfig/network-scripts/ifup-aliases
+
+ Bring up aliases for a device.
+
/etc/sysconfig/network-scripts/ifdhcpc-done
Called by dhcpcd once dhcp configuration is complete; sets
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index cf2f4779..18505370 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -173,4 +173,10 @@ if [ "$IPSETUP" != yes ]; then
fi
fi
+case $CONFIG in
+ eth*)
+ /etc/sysconfig/network-scripts/ifup-ipx $CONFIG
+ ;;
+esac
+
exec /etc/sysconfig/network-scripts/ifup-post $CONFIG
diff --git a/sysconfig/network-scripts/ifup-ipx b/sysconfig/network-scripts/ifup-ipx
new file mode 100755
index 00000000..b04fda67
--- /dev/null
+++ b/sysconfig/network-scripts/ifup-ipx
@@ -0,0 +1,44 @@
+#!/bin/bash
+# configures IPX on $1 if appropriate
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+if [ "$1" = "" ]; then
+ echo "usage: $0 <net-device>"
+ exit 1
+fi
+
+if [ ! -x /usr/bin/ipx_interface ] ; then
+ # cannot configure IPX with non-existant utilities
+ exit 0
+fi
+
+. /etc/sysconfig/network
+
+case $IPX in yes|true) ;; *) exit 0 ;; esac
+
+cd /etc/sysconfig/network-scripts
+
+. network-functions
+
+CONFIG=$1
+source_config
+
+for frametype in 802_2 802_3 ETHERII SNAP ; do
+ # Yes, this kind of evaluation is really necessary to do this.
+ # Welcome to shell programming... No, we were not smoking some
+ # particularly good floppies while we wrote this. :-)
+ case $(eval echo $(echo \$`echo IPXACTIVE_$frametype`)) in
+ yes|true)
+ case $(eval echo $(echo \$`echo IPXPRIMARY_$frametype`)) in
+ yes|true) primary=-p ;;
+ *) primary= ;;
+ esac
+ /usr/bin/ipx_interface add $1 $primary $frametype \
+ $(eval echo $(echo \$`echo IPXNETNUM_$frametype`))
+ ;;
+ esac
+done
+
+exit 0
+
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes
index 6cae8d4c..f0dde135 100755
--- a/sysconfig/network-scripts/ifup-routes
+++ b/sysconfig/network-scripts/ifup-routes
@@ -8,10 +8,8 @@ if [ "$1" = "" ]; then
fi
if [ -x /bin/linuxconf ] ; then
- rm -f /var/run/routes.current
linuxconf --hint routing "$1" | while read args; do
/sbin/route $args
- echo $args >> /var/run/routes.current
done
else
if [ ! -f /etc/sysconfig/static-routes ]; then