⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mobile-ip6.in

📁 mobile ipv6协议Linux实现源代码
💻 IN
字号:
#!/bin/sh## Load MIPL Mobile IPv6 module## chkconfig: 345 75 05# description: Automatically loads MIPL Mobile IPv6 kernel module and# configures it. See http://www.mipl.mediapoli.com/ for more information.# config: /etc/sysconfig/network-mip6.conf## @configure_input@MIPV6_BASE_MODULE=@MIPV6_BASE_MODULE@MIPV6_MN_MODULE=@MIPV6_MN_MODULE@MIPV6_HA_MODULE=@MIPV6_HA_MODULE@MIPV6_MODULE=prefix=@prefix@exec_prefix=@exec_prefix@initdir=@INITDIR@sysconfdir=@sysconfdir@CONFIG_FILE=@NETWORK_MIP6_CONF@/network-mip6.confMIPDIAG=@sbindir@/mipdiagSUBSYS=$1LOCKDIR=@LOCKDIR@MODPROBE=@sbindir@/modprobeLSMOD=@sbindir@/lsmod# Test if 'functions' exists. If not, define our own 'action'if test -x /etc/rc.d/init.d/functions ; then    . /etc/rc.d/init.d/functionselif test -x /etc/rc.config ; then    . /etc/rc.configelse    action() {	msg=$1	shift	eval "$*" >/dev/null 2>&1	ret=$?	if test $ret = 0 -a "x$*" != "x" ; then	    msg=$msg" OK"	else	    msg=$msg" Failed"	fi	logger $msg	echo $msg    }fiif [ -r $CONFIG_FILE ] ; then    . $CONFIG_FILEelse    echo "Cannot read configuration file: $CONFIG_FILE"    exit 1fifor file in $MIPDIAG $MODPROBE $LSMOD ; do    if [ ! -x $file ] ; then	echo "Cannot execute: $file"	exit 1    fidoneif [ "$FUNCTIONALITY" = "mn" ] ; then    MIPV6_MODULE=$MIPV6_MN_MODULEelif [ "$FUNCTIONALITY" = "ha" ] ; then    MIPV6_MODULE=$MIPV6_HA_MODULEelse    MIPV6_MODULE=$MIPV6_BASE_MODULEfiif [ -z "$HOMEADDRESS" -a "$FUNCTIONALITY" = "mn" ] ; then    echo "Home address not set for mobile node"    exit 1ficase "$1" in    start)	$LSMOD | grep $MIPV6_MODULE &>/dev/null && \	    echo "$MIPV6_MODULE already installed" && exit 1	INSMOD_ARGS=	if [ -n "$DEBUGLEVEL" ] ; then	    INSMOD_ARGS="$INSMOD_ARGS mipv6_debug=$DEBUGLEVEL"	fi	$MODPROBE $MIPV6_BASE_MODULE $INSMOD_ARGS &> /dev/null	status=$?	if [ "$FUNCTIONALITY" = "mn" -o "$FUNCTIONALITY" = "ha" ] ; then	    $MODPROBE $MIPV6_MODULE &> /dev/null	fi	action "Starting Mobile IPv6:" [ $status -eq 0 ] || exit 1	touch $LOCKDIR/mobile-ip6	# Temporary kludge to control get the new sysctls working.	# Should probably be integrated into mipdiag at some time.	if [ "$FUNCTIONALITY" = "ha" ] ; then 	    if [ -n "$MIN_TUNNEL_NR" ] ; then		echo $MIN_TUNNEL_NR > /proc/sys/net/ipv6/mobility/min_tnls	    fi	    if [ -n "$MAX_TUNNEL_NR" ] ; then		echo $MAX_TUNNEL_NR > /proc/sys/net/ipv6/mobility/max_tnls	    fi	fi	if [ "$FUNCTIONALITY" = "mn" ] ; then	    [ -n "$HOMEADDRESS" ] && \	    $MIPDIAG -i $HOMEDEV -h $HOMEADDRESS -H$HOMEAGENT	fi	if [ "$FUNCTIONALITY" = "ha" -a -n "$TUNNEL_SITELOCAL" ] ; then	    $MIPDIAG -t$TUNNEL_SITELOCAL	fi	if [ "$FUNCTIONALITY" = "ha" ] ; then 	    echo 1 > /proc/sys/net/ipv6/conf/all/forwarding	fi 	;;    stop)	action "Stopping Mobile IPv6:" [ -f $LOCKDIR/mobile-ip6 ] || exit 1	$MODPROBE -r $MIPV6_MODULE	rm -f $LOCKDIR/mobile-ip6	exit $?	;;    restart)	$0 stop	$0 start	exit $?	;;    status)	$LSMOD | grep $MIPV6_MODULE > /dev/null	if [ $? -eq 0 ]; then		echo "$MIPV6_MODULE module is installed..."		exit 0	fi       	# See if lock in $LOCKDIR exists	if [ -f $LOCKDIR/mobile-ip6 ]; then		echo "$MIPV6_MODULE module not installed but subsys locked"		exit 2	fi	echo "$MIPV6_MODULE module is not installed"	exit 3	;;    *)	echo "Usage mobile-ip6 {start|stop|status|restart}"	exit 1	;;esac

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -