- $Id: README,v 1.4 1999/09/02 12:38:52 misiek Exp $
+ $Id: README,v 1.5 2000/03/08 16:30:13 misiek Exp $
-If you want use this rc-scripts remember to compile 'netlink'
-support into your kernel. This is very important !
-([*] Kernel/User netlink socket)
+CRITICAL THINGS
+If you want use this rc-scripts remember to compile:
+- Kernel/User netlink socket
+support into your kernel. This is very important ! Without
+this network scripts will fail.
-If you want use IPv6 networking remember to compile 'IPv6 support'
-into you kernel !
+STANDARD THINGS
+If you want use IPv6 networking remember to compile:
+- The IPv6 protocol (EXPERIMENTAL)
+- IPv6: enable EUI-64 token format
+- IPv6: disable provider based addresses
+into your kernel (last two options are optional) !
#
-# $Id: functions.network,v 1.36 2000/02/03 11:50:04 misiek Exp $
+# $Id: functions.network,v 1.37 2000/03/08 16:30:14 misiek Exp $
# vi:syntax=sh
# This is not a shell script; it provides functions to network scripts
# that source it.
# PLD/Linux network functions
# (C) 1999 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
#
+
+# same as shell script run-parts from *cron* daemons
+rparts()
+{
+if [ -d "$1" -a "$ISALIAS" = "no" ]; then
+ if [ "$2" = "start" ]; then
+ FLIST="`ls $1/*.up | xargs 2>/dev/null`"
+ else if [ "$2" = "stop" ]; then
+ FLIST="`ls $1/*.down | xargs 2>/dev/null`"
+ fi
+ fi
+ for i in $FLIST ; do
+ [ -d $i ] && continue
+ if [ -x $i ]; then
+ $i
+ fi
+ done
+fi
+}
+
# All functions must be called "name_of_function on" or "name_of_function off"
# Setup Network Address Translation (NAT)
#!/bin/sh
#
-# $Id: ifdown-post,v 1.8 1999/10/13 21:28:40 kloczek Exp $
+# $Id: ifdown-post,v 1.9 2000/03/08 16:30:14 misiek Exp $
#
# This should be called whenever an interface goes down, not just when
# it is brought down explicitly.
source_config
+# full device name as specified by user
+FULLDEVNAME="$DEVICE"
+# type of device for example "dummy" or "eth"
+DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
+# name of real device ie. eth0 when eth0,eth0:1,eth0:alias
+DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
+
+if echo "$FULLDEVNAME" | grep -q ':' ; then
+ ISALIAS=yes
+else
+ ISALIAS=no
+fi
+
+# run scripts in /etc/sysconfig/interfaces/scripts/$DEVICE/
+# named somename.up
+rparts "/etc/sysconfig/interfaces/scripts/$DEVICE" stop
+
# Notify programs that have requested notification
do_netreport
#!/bin/sh
#
-# $Id: ifup,v 1.35 1999/12/19 16:06:02 jajcus Exp $
+# $Id: ifup,v 1.36 2000/03/08 16:30:14 misiek Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DEV=$1
[ -z "$DEV" ] && {
- echo "usage: ifup <device name>" >&2
+ nls "usage: ifup <device name>" >&2
exit 1
}
if [ -x /sbin/usernetctl ]; then
exec /sbin/usernetctl $DEV up
fi
- echo "Users cannot control this device." >&2
+ nls "Users cannot control this device." >&2
exit 1
fi
FULLDEVNAME="$DEVICE"
# detect network device type (dummy, eth ..)
DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
-# przyjmuje eth0 przy {eth0,eth0:1,eth0:alias}
+# real name of device (is eth0 for eth0,eth0:1,eth0:alias)
DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
if echo "$FULLDEVNAME" | grep -q ':' ; then
# IPv4, IPv6 or both ?
[ -n "$IPV6_ADDR" ] && IPv6=yes || IPv6=no
-[ -n "$IPADDR" -o "$PUMP" = "true" ] && IPv4=yes || IPv4=no
+[ -n "$IPADDR" -o "$PUMP" = "true" ] && IPv4=yes || IPv6=no
# Tunnel device ?
[ -f /etc/sysconfig/interfaces/tnlcfg-${FULLDEVNAME} ] && TNL=yes || TNL=no
fi
[ "$MULTICAST" = "yes" ] && MULTICAST=on || MULTICAST=off
-[ -n "$SRC_ADDR" ] && SRC_ADDR="src ${SRC_ADDR}" || SRC_ADDR=""
-[ -n "$SCOPE" ] && SCOPE="scope ${SCOPE}" || SCOPE=""
-[ -z "$PROTOCOL" ] && PROTOCOL=ip
+[ -n "$SRC_ADDR" ] && SRC_ADDR="src ${SRC_ADDR}" || SRC_ADDR=""
+[ -n "$SCOPE" ] && SCOPE="scope ${SCOPE}" || SCOPE=""
+[ -z "$PROTOCOL" ] && PROTOCOL=ip
if [ "$ARP" ]; then
[ "$ARP" = "yes" ] && ARP=on || ARP=off
if [ -n "$PUMP" -a "$ISALIAS" = "no" ]; then
- echo -n "Determining IP information for $FULLDEVNAME..."
+ echo -n "`nls "Determining IP information for"` $FULLDEVNAME..."
if /sbin/pump -i $FULLDEVNAME ; then
- echo " done."
+ nls " done."
else
- echo " failed."
+ nls " failed."
exit 1
fi
#!/bin/sh
#
-# $Id: ifup-post,v 1.15 1999/12/19 16:07:02 jajcus Exp $
+# $Id: ifup-post,v 1.16 2000/03/08 16:30:14 misiek Exp $
#
. /etc/sysconfig/network
CONFIG=$1
source_config
-# pelna nazwa dewajsa jaka podal user
+# full device name as specified by user
FULLDEVNAME="$DEVICE"
-# przyjmuje warto¶æ np: "dummy" czy "eth" itd.
+# type of device for example "dummy" or "eth"
DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
-# przyjmuje eth0 przy {eth0,eth0:1,eth0:alias}
+# name of real device ie. eth0 when eth0,eth0:1,eth0:alias
DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
if echo "$FULLDEVNAME" | grep -q ':' ; then
eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
fi
+# run scripts in /etc/sysconfig/interfaces/scripts/$DEVICE/
+# named somename.up
+rparts "/etc/sysconfig/interfaces/scripts/$DEVICE" start
+
# Notify programs that have requested notification
do_netreport