All the IPX stuff is optional, and should default to off.
+/etc/sysconfig/static-nat
+
+ Configuration file for static Network Address Translation (NAT).
+ Contains lines of the form:
+
+ <address> via <addressreal>
+
+ NAT will translate address <address> to <addressreal>.
+
/etc/sysconfig/static-routes:
Contains lines of the form:
- <device> net <network> netmask <netmask> gw <gateway>
+ <device> to [type] <network>/<prefix> via <gateway>
<device> may be a device name to have the route brought up and
down with the device, or "any" to have the correct devices calculated
- at run time.
+ at run time. [type] is optional. RH style isn't supported !
+
+ Also you can set few options after "<gateway>":
+ tos <tos>
+ metric <number>
+ table <table>
+ src <address>
+ realm <realmid>
+ mtu <mtu> or mtu lock <mtu>
+ window <number>
+ rtt <number>
+ nexthop <nexthop>
+ scope <scope>
+ protocol <rtproto>
+ onlink
+ equalize
+ For more informations see iproute2 documentation .
/etc/sysconfig/routed:
#
calcnetmask() {
local prefix a
+MASK=""
prefix=$[ $1 ]
for i in 1 2 3 4
do
}
-interfaces="`cd /etc/sysconfig/interfaces && ls -1 ifcfg-* | grep -v ifcfg-lo | xargs 2> /dev/null`"tunnels="`cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | xargs 2> /dev/null`"
+interfaces="`cd /etc/sysconfig/interfaces && ls -1 ifcfg-* | grep -v ifcfg-lo | xargs 2> /dev/null`"
+tunnels="`cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | xargs 2> /dev/null`"
# See how we were called.
case "$1" in
start)
network_init
+ for i in $tunnels do
+ [ -f /etc/sysconfig/interfaces/$i ] && /sbin/tnlup $i boot
+ done
for i in $interfaces; do
[ -f $i ] && /sbin/ifup $i boot
done
for i in $interfaces; do
[ -f $i ] && /sbin/ifdown $i boot
done
+ for i in $tunnels do
+ [ -f /etc/sysconfig/interfaces/$i ] && /sbin/tnldown $i boot
+ done
network_deinit
rm -f /var/lock/subsys/network
;;
+++ /dev/null
-#!/bin/sh
-#
-# /etc/rc.d/init.d/tunnels-ip6.init
-#
-# based on
-## network Bring up/down networking
-##
-## Modified: Ngo Than
-## Date: 07.04.1998
-######################################################################
-## Modified: Erik Heim <erik@seitz.de>
-## Date : 19.3.98
-## Reason : for startup
-#####################################################################
-
-# and based on my
-# /etc/rc.d/init.d/tunnels-ip6.init
-# Version 1.03
-#
-# Starts and stops the IPv6 over IPv4 tunnels
-#
-# Copyright 1997-1998 Peter Bieringer <pb@bieringer.de>
-#
-# Version 1.12 07.08.1998
-#
-# Changes to
-# 1.10: Merge into DLD 5.4
-# 1.11: Updates for dual usage (DLD 5.4 or another RedHat compatible system)
-# 1.12: Bugfix, don't used the switch from network-ip6
-
-subsys_parameter=$1
-LOCKDIR=/var/lock/subsys
-##################################################################
-start_and_stop() {
- # Source function library.
- [ ! -f /etc/rc.d/init.d/functions ] && exit 1
- . /etc/rc.d/init.d/functions
-
- # If some used functions were not defined until now...
- # At the moment, only Delix DLD 5.4 supports them directly
-
- if ! print_message >/dev/null 2>&1; then
- print_message () {
- $0 ${subsys_parameter}_msg
- }
- fi
-
- if ! check_lock >/dev/null 2>&1; then
- check_lock() {
- local LOCK_FAIL
- if [ $# = 0 ]; then
- echo "check_lock Lockfile start|stop"
- return 2
- fi
- LOCK_FAIL=0
- if [ -f "$1" -a "$2" = "stop" ]; then LOCK_FAIL=1 ; fi
- if [ ! -f "$1" -a "$2" = "start" ]; then LOCK_FAIL=1 ; fi
- echo
- return $LOCK_FAIL
- }
- fi
-
- if ! logexec >/dev/null 2>&1; then
- logexec() {
- $*
- }
- fi
-
- # End of defines
-
- [ ! -f /etc/sysconfig/network ] && exit 1
- . /etc/sysconfig/network
- # Check that networking is up.
- [ "$NETWORKING" = "yes" ] || exit 2
-
- [ -x /sbin/ifconfig ] || exit 1
- print_message
-
- check_lock $LOCKDIR/tunnels-ip6.init "$subsys_parameter"
- if [ "$?" = 0 ]; then exit 0 ; fi
-
-
- [ ! -f /etc/rc.d/init.d/functions-ip6 ] && exit 1
- . /etc/rc.d/init.d/functions-ip6
-
- test-ip6 || exit
-
- [ "$IP6TUNNELCONFIG" = "yes" ] || exit 2
-}
-
-##################################################################
-# See how we were called.
-##################################################################
-case "$subsys_parameter" in
- start_msg)
- echo -n "Start IPv6-over-IPv4-Tunnel(s)."
- ;;
- stop_msg)
- echo -n "Stop IPv6-over-IPv4-Tunnel(s)."
- ;;
- start)
- start_and_stop
-
- logexec tunnels-up-ip6
-
- logexec touch $LOCKDIR/tunnels-ip6.init
-
- exit $FAIL
- ;;
- stop)
- start_and_stop
-
- logexec tunnels-down-ip6
-
- logexec rm -f $LOCKDIR/tunnels-ip6.init
-
- exit $FAIL
- ;;
- restart)
- $0 stop
- $0 start
- exit $?
- ;;
- *)
- echo "Usage: tunnels-ip6.init {start|stop|restart|start_msg|stop_msg}"
- exit 1
- ;;
-esac
-
-exit 0
-
typedef unsigned int int32;
int main(int argc, char ** argv) {
- int showBroadcast = 0, showNetwork = 0, showHostname = 0, showNetmask = 0, showShortNetmask = 0;
+ int showBroadcast = 0, showNetwork = 0, showHostname = 0, showNetmask = 0, showPrefix = 0;
int beSilent = 0;
int rc;
poptContext optCon;
+++ /dev/null
-#!/bin/sh
-
-SLEEPPIDFILE=/var/run/dhcp-wait-${IFNAME}.pid
-
-if [ ! -f $SLEEPPIDFILE ]; then
- # the parent must have timed out already -- we can't do much about
- # it now
- echo "DHCP configured but ifup timed out"
- #exit 0
-fi
-
-# get the pid of the process which is waiting for this to complete
-SLEEPPID=`cat $SLEEPPIDFILE`
-rm -f $SLEEPPIDFILE
-kill $SLEEPPID
-
-if [ -f /etc/dhcpc/resolv.conf ]; then
- cp /etc/dhcpc/resolv.conf /etc
-fi
if [ "$IPSETUP" != yes ]; then
if [ -z "$PREFIX" ]; then
- eval `/bin/ipcalc --short-netmask ${IPADDR}`
+ eval `/bin/ipcalc --prefix ${IPADDR}`
fi
if [ -z "$BROADCAST" ]; then
fi
#note the trailing space in the grep gets rid of aliases
grep "^$1 " /etc/sysconfig/static-routes | while read device args; do
- /sbin/route add -$args $device
+ /sbin/ip route add $args dev $device
done