# chkconfig: 2345 99 1
# description: Allow users to login.
#
-# $Id: allowlogin,v 1.4 1999/09/27 09:54:58 misiek Exp $
+# $Id: allowlogin,v 1.5 1999/10/06 16:52:37 kloczek Exp $
# NLS
NLS_DOMAIN="rc-scripts"
# See how we were called.
case "$1" in
start)
- if [ "$DELAY_LOGIN" == "yes" ] && [ -f /etc/nologin.boot ]; then
+ if [ "$DELAY_LOGIN" = "yes" ] && [ -f /etc/nologin.boot ]; then
run_cmd "Allowing users to login" rm -f /etc/nologin /etc/nologin.boot
fi
;;
stop)
# /etc/nologin when shutting down system
- if [ "$DELAY_LOGIN" == "yes" ] && [ ! -f /etc/nologin ]; then
+ if [ "$DELAY_LOGIN" = "yes" ] && [ ! -f /etc/nologin ]; then
nls "System shutdown in progress \n" > /etc/nologin
chmod 644 /etc/nologin
cp -fp /etc/nologin /etc/nologin.boot
# functions This file contains functions to be used by most or all
# shell scripts in the /etc/init.d directory.
#
-# $Id: functions,v 1.28 1999/09/27 18:31:05 wiget Exp $
+# $Id: functions,v 1.29 1999/10/06 16:52:37 kloczek Exp $
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Hacked by: Greg Galloway and Marc Ewing
# Colors workaround
termput()
{
- if [ "$COLOR_INIT" == "no" ]; then
+ if [ "$COLOR_INIT" = "no" ]; then
:
elif [ ! -d /usr/share/terminfo ] || \
! ( [ -x /usr/bin/tput ] || [ -x /bin/tput ] ) ; then
# Kill it.
if [ "$pid" != "" ] ; then
- if [ "$notset" == "1" ] ; then
+ if [ "$notset" = "1" ] ; then
if ps h $pid>/dev/null 2>&1; then
# TERM first, then KILL if not dead
kill -TERM $pid >/dev/null 2>&1
#
-# $Id: functions.network,v 1.27 1999/09/28 16:15:56 jajcus Exp $
+# $Id: functions.network,v 1.28 1999/10/06 16:52:37 kloczek Exp $
#
# This is not a shell script; it provides functions to network scripts
# that source it.
{
if [ -r /etc/sysconfig/static-nat ]; then
grep "^[0-9]" /etc/sysconfig/static-nat | while read src via dst; do
- if [ "$1" == "on" ]; then
+ if [ "$1" = "on" ]; then
/sbin/ip route add nat $src via $dst
/sbin/ip rule add from $dst nat $src
- elif [ "$1" == "off" ]; then
+ elif [ "$1" = "off" ]; then
/sbin/ip rule del from $dst nat $src
/sbin/ip route del nat $src via $dst
fi
eval VARD=\$${VAR}
if [ -n "$VARD" ] && [ -e /proc/sys/net/$WHAT ]; then
- if [ "$TODO" == "start" ]; then
- [ "$VARD" == "no" -a "$SET" == "1" ] && SET="$(($SET - 1))"
- [ "$VARD" == "yes" -a "$SET" == "0" ] && SET="$(($SET + 1))"
+ if [ "$TODO" = "start" ]; then
+ [ "$VARD" = "no" -a "$SET" = "1" ] && SET="$(($SET - 1))"
+ [ "$VARD" = "yes" -a "$SET" = "0" ] && SET="$(($SET + 1))"
if [ -n "$MESSAGE" ]; then
show "`nls "Setting %s to %s" "$MESSAGE" "$SET"`"; busy
if (echo "$SET" > /proc/sys/net/$WHAT) 2> /dev/null; then
else
echo "$SET" > /proc/sys/net/$WHAT
fi
- elif [ "$TODO" == "stop" ]; then
+ elif [ "$TODO" = "stop" ]; then
if [ -n "$MESSAGE" ]; then
show "`nls "Setting %s to %s" "$MESSAGE" "$DEF"`"; busy
if (echo "$DEF" > /proc/sys/net/$WHAT) 2> /dev/null; then
*) IPV4_DYNAMIC_IP_PATCH_VALUE=7 ;;
esac
-if [ "$IPV4_DYNAMIC_IP_PATCH" == "yes" ] && [ "$1" == "on" ]; then
+if [ "$IPV4_DYNAMIC_IP_PATCH" = "yes" ] && [ "$1" = "on" ]; then
show "Enabling dynamic IP patch"; busy
if echo $IPV4_DYNAMIC_IP_PATCH_VALUE > /proc/sys/net/ipv4/ip_dynaddr; then deltext; ok; else deltext; fail; fi
else
{
if [ "$IPV4_LOCAL_PORT_RANGE" != "default" -a -n "$IPV4_LOCAL_PORT_RANGE" ] || \
[ ! -e /proc/sys/net/ipv4/ip_local_port_range ]; then
- if [ "$IPV4_LOCAL_PORT_RANGE" == "yes" ] && [ "$1" == "on" ]; then
+ if [ "$IPV4_LOCAL_PORT_RANGE" = "yes" ] && [ "$1" = "on" ]; then
show "Setting local port range"; busy
if echo "$IPV4_LOCAL_PORT_RANGE" > /proc/sys/net/ipv4/ip_local_port_range; then
deltext
{
if [ "$IPV4_ANTI_SPOOFING" != "default" -a -n "$IPV4_ANTI_SPOOFING" ] || \
[ ! -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
- if [ "$IPV4_ANTI_SPOOFING" == "yes" ] && [ "$1" == "on" ]; then
+ if [ "$IPV4_ANTI_SPOOFING" = "yes" ] && [ "$1" = "on" ]; then
show "Setting up IP spoofing protection"; busy
if (for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f; done); then
deltext
static_arp()
{
-if [ "$STATIC_ARP" == "yes" ]; then
+if [ "$STATIC_ARP" = "yes" ]; then
if [ -r /etc/ethers -a -x /sbin/arp ]; then
/sbin/arp -f /etc/ethers
fi
modprobe_net()
{
-[ "$IPV6_NETWORKING" == "yes" ] && [ "`ls -R /lib/modules/\`uname -r\`/ | grep ipv6.o`" != "" ] && modprobe -s -k net-pf-10
+[ "$IPV6_NETWORKING" = "yes" ] && [ "`ls -R /lib/modules/\`uname -r\`/ | grep ipv6.o`" != "" ] && modprobe -s -k net-pf-10
}
#
done
IFS=$OIFS
-if [ "$bad" == "0" ]; then
+if [ "$bad" = "0" ]; then
echo "$prefix"
else
echo "32"
calcnetmask() {
local prefix a MASK
MASK=""
-if [ "`echo "${1}" | grep "^[0-9]"`" == "" ]; then
+if [ "`echo "${1}" | grep "^[0-9]"`" = "" ]; then
prefix=32
else
typeset -i prefix=$1
# start at boot time.
# probe: true
-# $Id: network,v 1.24 1999/09/28 16:16:42 jajcus Exp $
+# $Id: network,v 1.25 1999/10/06 16:52:37 kloczek Exp $
# NLS
NLS_DOMAIN="rc-scripts"
. /etc/sysconfig/network
# Check that networking is up.
-[ "${NETWORKING}" == "no" -o "${NETWORKING}" == "" ] && exit 0
+[ "${NETWORKING}" = "no" -o "${NETWORKING}" = "" ] && exit 0
[ -x /sbin/ip ] || exit 0
# responsible for the very first setup of basic
# things, such as setting the hostname.
#
-# $Id: rc,v 1.12 1999/09/28 14:24:23 kloczek Exp $
+# $Id: rc,v 1.13 1999/10/06 16:52:36 kloczek Exp $
#
# Original Author:
# Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# if runlevel is 0 (halt) or 6 (reboot) change to first
# virtual console
-if [ "$runlevel" == "0" ] || [ "$runlevel" == "6" ]; then
+if [ "$runlevel" = "0" ] || [ "$runlevel" = "6" ]; then
exec 0<> /dev/tty1 1>&0 2>&0
[ -x /usr/bin/chvt ] && /usr/bin/chvt 1 && echo
else
-# if previous runlevel == current runlevel do nothing
- [ "$runlevel" == "$previous" ] && exit 0
+# if previous runlevel = current runlevel do nothing
+ [ "$runlevel" = "$previous" ] && exit 0
fi
# set onlcr to avoid staircase effect and do not lock scrolling
#!/bin/sh
#
# /etc/rc.d/rc.sysinit - run once at boot time
-# $Id: rc.sysinit,v 1.30 1999/09/28 14:23:07 kloczek Exp $
+# $Id: rc.sysinit,v 1.31 1999/10/06 16:52:36 kloczek Exp $
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
# Changes: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
nls "\n\n*** An error occurred during the file system check.\n*** Dropping you to a shell; the system will reboot\n*** when you leave the shell.\n"
PS1="`nls "(Repair filesystem) #"`"; export PS1
- if [ "$RUN_SULOGIN_ON_ERR" == "yes" ]; then
+ if [ "$RUN_SULOGIN_ON_ERR" = "yes" ]; then
sulogin
else
/bin/sh
run_cmd "Unmounting file systems" umount -a
mount -n -o remount,ro /
run_cmd "Automatic reboot in progress." reboot
- elif [ "$rc" == "1" ]; then
+ elif [ "$rc" = "1" ]; then
_RUN_QUOTACHECK=1
fi
fi
# set up pnp
if [ -x /sbin/isapnp -a -f /etc/isapnp/isapnp.conf ]; then
- if [ -n "$PNP" ] && [ "$RUN_ISAPNP" == "yes" ]; then
+ if [ -n "$PNP" ] && [ "$RUN_ISAPNP" = "yes" ]; then
run_cmd "Setting up ISA PNP devices" /sbin/isapnp /etc/isapnp/isapnp.conf
fi
fi
run_cmd "Remounting root filesystem in rw mode" mount -n -o remount,rw /
# Update quotas if fsck was run on /.
-if [ X"$_RUN_QUOTACHECK" == "X1" -a -x /sbin/quotacheck ] && [ ! -n "$NFSROOT" ]; then
+if [ X"$_RUN_QUOTACHECK" = "X1" -a -x /sbin/quotacheck ] && [ ! -n "$NFSROOT" ]; then
run_cmd "Checking root filesystem quotas" /sbin/quotacheck -v /
fi
# /etc/nologin when starting system
[ -f /etc/nologin.boot ] && rm -f /etc/nologin /etc/nologin.boot
-if [ "$DELAY_LOGIN" == "yes" ] && [ ! -f /etc/nologin ]; then
+if [ "$DELAY_LOGIN" = "yes" ] && [ ! -f /etc/nologin ]; then
show "Enabling Delay Login"; busy
echo > /etc/nologin
nls "System bootup in progress - please wait" >> /etc/nologin
fi
# load sound modules
-if [ -n "$USEMODULES" ] && [ "$LOAD_SOUND" == "yes" ]; then
+if [ -n "$USEMODULES" ] && [ "$LOAD_SOUND" = "yes" ]; then
if grep -s -q "^alias sound" /etc/conf.modules ; then
run_cmd "Loading sound module" modprobe -s sound
fi
nls "\n\n*** An error occurred during the RAID startup\n*** Dropping you to a shell; the system will reboot\n*** when you leave the shell.\n"
PS1="`nls "(RAID Repair) #"`"; export PS1
- if [ "$RUN_SULOGIN_ON_ERR" == "yes" ]; then
+ if [ "$RUN_SULOGIN_ON_ERR" = "yes" ]; then
sulogin
else
/bin/sh
nls "\n\n*** An error occurred during the file system check.\n*** Dropping you to a shell; the system will reboot\n*** when you leave the shell.\n"
PS1="`nls "(Repair filesystem) #"`"; export PS1
- if [ "$RUN_SULOGIN_ON_ERR" == "yes" ]; then
+ if [ "$RUN_SULOGIN_ON_ERR" = "yes" ]; then
sulogin
else
/bin/sh
run_cmd "Unmounting file systems" umount -a
run_cmd "Remounting root filesystem in ro mode" mount -n -o remount,ro /
run_cmd "Automatic reboot in progress." reboot
- elif [ "$rc" == "1" -a -x /sbin/quotacheck ]; then
+ elif [ "$rc" = "1" -a -x /sbin/quotacheck ]; then
run_cmd "Checking filesystem quotas" /sbin/quotacheck -v -R -a
fi
fi
chmod 0664 /var/run/utmpx /var/log/wtmpx
# Clean /tmp
-if [ "$CLEAN_TMP" == "yes" ]; then
+if [ "$CLEAN_TMP" = "yes" ]; then
rm -rf /tmp/*
fi
. /etc/sysconfig/clock
# convert old style clock config to new values
- if [ "${CLOCKMODE}" == "GMT" ]; then
+ if [ "${CLOCKMODE}" = "GMT" ]; then
UTC=true
- elif [ "${CLOCKMODE}" == "ARC" ]; then
+ elif [ "${CLOCKMODE}" = "ARC" ]; then
ARC=true
fi
fi
# Right, now turn on swap in case we swap to files.
show "Enabling swap space"; busy
-if [ "`LANG=C swapon -a 2>&1 | grep -v "busy"`" == "" ]; then
+if [ "`LANG=C swapon -a 2>&1 | grep -v "busy"`" = "" ]; then
deltext; ok
else
deltext; fail
#!/bin/sh
#
-# $Id: ifdown,v 1.12 1999/09/28 16:17:30 jajcus Exp $
+# $Id: ifdown,v 1.13 1999/10/06 16:52:37 kloczek Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
# 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 || IPv4=no
if [ -z "$PREFIX" ] && [ -n "$NETMASK" ]; then
PREFIX="`calcprefix $NETMASK`"
DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-${DEVICETYPE}"
-if [ -x $OTHERSCRIPT -a "$IPv4" == "yes" ]; then
- if [ "$DEFAULTHANDLING" == "yes" ]; then
+if [ -x $OTHERSCRIPT -a "$IPv4" = "yes" ]; then
+ if [ "$DEFAULTHANDLING" = "yes" ]; then
$OTHERSCRIPT $CONFIG $2
else
$OTHERSCRIPT $CONFIG $2
ISALIAS=no
fi
-if [ "$ISALIAS" == "yes" ]; then
- if [ "$IPv4" == "yes" ]; then
+if [ "$ISALIAS" = "yes" ]; then
+ if [ "$IPv4" = "yes" ]; then
ip -family inet addr del ${IPADDR}/${PREFIX} dev ${DEVICE} label ${FULLDEVNAME}
fi
for ADDR in ${IPV6_ADDR} ; do
#!/bin/sh
#
-# $Id: ifdown-sl,v 1.7 1999/09/28 16:17:30 jajcus Exp $
+# $Id: ifdown-sl,v 1.8 1999/10/06 16:52:37 kloczek Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
fi
#
# The proctitle for connected dip daemons is actually "-dip (ipaddr)"
-# with ipaddr == local on dial-out, remote on dial-in
+# with ipaddr = local on dial-out, remote on dial-in
# Grab the PID of connected dial-out daemon.
#
if [ -z "$PID" ]; then
#!/bin/sh
#
-# $Id: ifup,v 1.27 1999/09/28 16:17:30 jajcus Exp $
+# $Id: ifup,v 1.28 1999/10/06 16:52:37 kloczek Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
source_config
-if [ "foo$2" == "fooboot" -a "${ONBOOT}" == "no" ]; then
+if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]; then
exit
fi
fi
# Old BOOTP variable
-if [ "$BOOTP" == "yes" ]; then
+if [ "$BOOTP" = "yes" ]; then
BOOTPROTO=bootp
fi
-if [ "$BOOTPROTO" == bootp -o "$BOOTPROTO" == "dhcp" ]; then
+if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = "dhcp" ]; then
PUMP=true
fi
# 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 || IPv4=no
# Tunnel device ?
[ -f /etc/sysconfig/interfaces/tnlcfg-${FULLDEVNAME} ] && TNL=yes || TNL=no
-if [ "$TNL" == "yes" ]; then
+if [ "$TNL" = "yes" ]; then
TNLOPTS="onlink"
fi
NETMASK="`calcnetmask $PREFIX`"
fi
-[ "$MULTICAST" == "yes" ] && MULTICAST=on || MULTICAST=off
+[ "$MULTICAST" = "yes" ] && MULTICAST=on || MULTICAST=off
[ -n "$SRC_ADDR" ] && SRC_ADDR="src ${SRC_ADDR}" || SRC_ADDR=""
[ -z "$PROTOCOL" ] && PROTOCOL=ip
if [ "$ARP" ]; then
- [ "$ARP" == "yes" ] && ARP=on || ARP=off
+ [ "$ARP" = "yes" ] && ARP=on || ARP=off
elif [ "$DEVICETYPE" = "eth" ]; then
ARP=on
else
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}"
-if [ -x "$OTHERSCRIPT" -a "$IPv4" == "yes" ]; then
- if [ "$DEFAULTHANDLING" == "yes" ]; then
+if [ -x "$OTHERSCRIPT" -a "$IPv4" = "yes" ]; then
+ if [ "$DEFAULTHANDLING" = "yes" ]; then
$OTHERSCRIPT $CONFIG $2
else
exec $OTHERSCRIPT $CONFIG $2
exit 0
fi
-if [ "$SLAVE" == "yes" -a "$ISALIAS" == "no" -a "$MASTER" != "" -a -x /sbin/ifenslave ]; then
- RFLAG="" ; [ "${RECIEVE-ONLY}" == "yes" ] && RFLAG="-r"
+if [ "$SLAVE" = "yes" -a "$ISALIAS" = "no" -a "$MASTER" != "" -a -x /sbin/ifenslave ]; then
+ RFLAG="" ; [ "${RECIEVE-ONLY}" = "yes" ] && RFLAG="-r"
ip link set ${DEVICE} down
echo "Enslaving $DEVICE to $MASTER"
ip link set ${DEVICE} address ${MACADDR}
fi
-if [ -n "$PUMP" ] && [ "$ISALIAS" == "no" ]; then
+if [ -n "$PUMP" ] && [ "$ISALIAS" = "no" ]; then
echo -n "Determining IP information for $DEVICEFULLNAME..."
if /sbin/pump -i $DEVICEFULLNAME ; then
else
-if [ "$IPv4" == "yes" ]; then
+if [ "$IPv4" = "yes" ]; then
if [ -z "$PREFIX" ]; then
eval `/bin/ipcalc --prefix ${IPADDR}`
fi
ip link set ${DEVICE} multicast ${MULTICAST} arp ${ARP} up
-if [ "$IPv4" == "yes" ]; then
+if [ "$IPv4" = "yes" ]; then
ip -family inet addr add ${IPADDR}/${PREFIX} broadcast ${BROADCAST} dev ${DEVICE} label ${FULLDEVNAME}
# Another IPv4 aliases support
# IPv6 rules
- if [ "${IPV6_NETWORKING}" == "yes" ] ; then
+ if [ "${IPV6_NETWORKING}" = "yes" ] ; then
for ADDR6 in ${IPV6_ADDR} ; do
ip -family inet6 addr add ${ADDR6} dev ${DEVICE} label ${FULLDEVNAME}
done
# only for sit tunnel device
- if (ip tunnel show ${FULLDEVNAME} 2>&1 | grep -q "ipv6/ip") && [ "$TNL" == "yes" ]; then
+ if (ip tunnel show ${FULLDEVNAME} 2>&1 | grep -q "ipv6/ip") && [ "$TNL" = "yes" ]; then
for ADDR4 in `ip -4 addr | grep inet | grep -v "127\..*\..*\..*" | \
sed -e "s#.*inet ##" | sed -e "s#/.*##" | xargs`; do
fi
# hack for 2.2 kernels
-if [ "$IPv4" == "yes" ]; then
- if [ "$ISALIAS" == "no" ] && [ -z "`ip -f inet route | sed "s/ .*//" | grep ${NETWORK}`" ]; then
+if [ "$IPv4" = "yes" ]; then
+ if [ "$ISALIAS" = "no" ] && [ -z "`ip -f inet route | sed "s/ .*//" | grep ${NETWORK}`" ]; then
ip -family inet route add ${NETWORK}/${PREFIX} dev ${DEVICE} ${SRC_ADDR} ${TNLOPTS}
else
ip -family inet route add ${IPADDR}/32 dev ${DEVICE} ${SRC_ADDR} ${TNLOPTS}
fi
fi
-if [ "$IPX" == "yes" ]; then
+if [ "$IPX" = "yes" ]; then
/etc/sysconfig/network-scripts/ifup-ipx $DEVICE
fi
#!/bin/sh
#
-# $Id: ifup-post,v 1.11 1999/09/28 16:17:30 jajcus Exp $
+# $Id: ifup-post,v 1.12 1999/10/06 16:52:37 kloczek Exp $
#
cd /etc/sysconfig/network-scripts
/etc/sysconfig/network-scripts/ifup-routes ${FULLDEVNAME}
-if [ "$ISALIAS" == "no" ] ; then
+if [ "$ISALIAS" = "no" ] ; then
/etc/sysconfig/network-scripts/ifup-aliases ${DEVICE}
fi
#!/bin/sh
#
-# $Id: ifup-sl,v 1.13 1999/09/02 12:25:35 misiek Exp $
+# $Id: ifup-sl,v 1.14 1999/10/06 16:52:37 kloczek Exp $
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
ip -family inet addr add $IPADDR peer $REMIP dev $DEVICE
# Set defaultroute
- if [ "$DEFROUTE" == "yes" ]; then
+ if [ "$DEFROUTE" = "yes" ]; then
ip -family inet route add default dev $DEVICE
fi
#!/bin/sh
#
-# $Id: tnldown,v 1.7 1999/09/27 10:01:33 misiek Exp $
+# $Id: tnldown,v 1.8 1999/10/06 16:52:37 kloczek Exp $
#
# Author: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
#
exit
fi
-if [ "${IPV6_TUNNELCONFIG}" != "yes" ] && [ "${MODE}" == "sit" ] || \
- [ "${IPX}" != "yes" ] && [ "${MODE}" == "ipxip" ] || \
- [ "${IPX}" != "yes" ] && [ "${MODE}" == "ipipx" ]
+if [ "${IPV6_TUNNELCONFIG}" != "yes" ] && [ "${MODE}" = "sit" ] || \
+ [ "${IPX}" != "yes" ] && [ "${MODE}" = "ipxip" ] || \
+ [ "${IPX}" != "yes" ] && [ "${MODE}" = "ipipx" ]
then
exit
fi
-if [ "${MODE}" == "ipip" ] || [ "${MODE}" == "sit" ] || [ "${MODE}" == "gre" ]; then
+if [ "${MODE}" = "ipip" ] || [ "${MODE}" = "sit" ] || [ "${MODE}" = "gre" ]; then
ip tunnel del ${DEVICE}
-elif [ "${MODE}" == "ipxip" ] || [ "${MODE}" == "ipipx" ]; then
+elif [ "${MODE}" = "ipxip" ] || [ "${MODE}" = "ipipx" ]; then
echo "obs³uga ipxip jeszcze nie zrobiona"
#!/bin/sh
#
-# $Id: tnlup,v 1.11 1999/09/27 10:01:33 misiek Exp $
+# $Id: tnlup,v 1.12 1999/10/06 16:52:37 kloczek Exp $
#
# Author: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
#
exit
fi
-if [ "${IPV6_TUNNELCONFIG}" != "yes" ] && [ "${MODE}" == "sit" ] || \
- [ "${IPX}" != "yes" ] && [ "${MODE}" == "ipxip" ] || \
- [ "${IPX}" != "yes" ] && [ "${MODE}" == "ipipx" ]
+if [ "${IPV6_TUNNELCONFIG}" != "yes" ] && [ "${MODE}" = "sit" ] || \
+ [ "${IPX}" != "yes" ] && [ "${MODE}" = "ipxip" ] || \
+ [ "${IPX}" != "yes" ] && [ "${MODE}" = "ipipx" ]
then
exit
fi
-if [ "${MODE}" == "gre" ] && [ "`ls -R /lib/modules/\`uname -r\`/ | grep ip_gre.o`" != "" ]; then
+if [ "${MODE}" = "gre" ] && [ "`ls -R /lib/modules/\`uname -r\`/ | grep ip_gre.o`" != "" ]; then
modprobe -s -k ip_gre
-elif [ "${MODE}" == "ipip" ] && [ "`ls -R /lib/modules/\`uname -r\`/ | grep ipip.o`" != "" ]; then
+elif [ "${MODE}" = "ipip" ] && [ "`ls -R /lib/modules/\`uname -r\`/ | grep ipip.o`" != "" ]; then
modprobe -s -k ipip
fi
[ -n "${TOS}" ] && TOS="tos ${TOS}"
[ -n "${BIND_DEV}" ] && BIND_DEV="dev ${BIND_DEV}"
-if [ "${SEQ}" == "yes" ]; then
+if [ "${SEQ}" = "yes" ]; then
SEQ=seq
else
- [ "${ISEQ}" == "yes" ] && SEQ=iseq
- [ "${OSEQ}" == "yes" ] && SEQ="${SEQ} oseq"
+ [ "${ISEQ}" = "yes" ] && SEQ=iseq
+ [ "${OSEQ}" = "yes" ] && SEQ="${SEQ} oseq"
fi
-if [ "${CSUM}" == "yes" ]; then
+if [ "${CSUM}" = "yes" ]; then
CSUM=csum
else
- [ "${ICSUM}" == "yes" ] && CSUM=icsum
- [ "${ICSUM}" == "yes" ] && CSUM="${SEQ} ocsum"
+ [ "${ICSUM}" = "yes" ] && CSUM=icsum
+ [ "${ICSUM}" = "yes" ] && CSUM="${SEQ} ocsum"
fi
-[ "${ISEQ}" == "yes" ] && ISEQ=iseq
-[ "${ISEQ}" == "yes" ] && ISEQ=iseq
-[ "${ISEQ}" == "yes" ] && ISEQ=iseq
-[ "${ISEQ}" == "yes" ] && ISEQ=iseq
+[ "${ISEQ}" = "yes" ] && ISEQ=iseq
+[ "${ISEQ}" = "yes" ] && ISEQ=iseq
+[ "${ISEQ}" = "yes" ] && ISEQ=iseq
+[ "${ISEQ}" = "yes" ] && ISEQ=iseq
[ "${TTL}" != "0" -a "${TTL}" != "inherit" ] && PMTUDISC=yes
-if [ "${PMTUDISC}" == "yes" ]; then
+if [ "${PMTUDISC}" = "yes" ]; then
PMTUDISC=pmtudisc
-elif [ "${PMTUDISC}" == "no" ]; then
+elif [ "${PMTUDISC}" = "no" ]; then
PMTUDISC=nopmtudisc
fi
OKEY=""
fi
-if [ "${MODE}" == "ipip" ] || [ "${MODE}" == "sit" ]; then
+if [ "${MODE}" = "ipip" ] || [ "${MODE}" = "sit" ]; then
ip tunnel add ${DEVICE} mode ${MODE} local ${LOCALADDR} remote ${REMOTEADDR} ${TTL} ${TOS} ${PMTUDISC} ${BIND_DEV}
-elif [ "${MODE}" == "gre" ]; then
+elif [ "${MODE}" = "gre" ]; then
ip tunnel add ${DEVICE} mode ${MODE} local ${LOCALADDR} remote ${REMOTEADDR} ${TTL} ${TOS} ${PMTUDISC} ${BIND_DEV} ${CSUM} ${ISEQ} ${KEY} ${IKEY} ${OKEY}
-elif [ "${MODE}" == "ipxip" ] || [ "${MODE}" == "ipipx" ]; then
+elif [ "${MODE}" = "ipxip" ] || [ "${MODE}" = "ipipx" ]; then
echo "obs³uga ipxip jeszcze nie zrobiona"