cmdrip

来自「基于routed的RIP2, 实现了multicast 和Broadcast」· 代码 · 共 88 行

TXT
88
字号
#!/bin/sh routed_start(){	local ver=`/usr/sbin/nvram get rip_version`	local dir=`/usr/sbin/nvram get rip_direction`	case "$ver$dir" in	10)		/usr/sbin/routedv1 -s &		;;	11)		/usr/sbin/routedv1 -q &		;;	12)		/usr/sbin/routedv1 -s &		;;	30)				/usr/sbin/routedv2 -a -m &		;;	31)				/usr/sbin/routedv2 -a -m -s &		;;	32)				/usr/sbin/routedv2 -a -m &		;;	20)		/usr/sbin/routedv2 -a &		;;	21)		/usr/sbin/routedv2 -a -s &		;;	22)		/usr/sbin/routedv2 -a &		;;	*)		echo -n "no start rip "		exit 1		;;	esac}## Exection begins here#ripd_ver_conf=/tmp/configs/rip_versionripd_dir_conf=/tmp/configs/rip_directioncase "$1" instart)	if [ ! -f $ripd_ver_conf ]; then	        exit 0	fi		if [ ! -f $ripd_dir_conf ]; then	        exit 0	fi			echo -n "Ripd start : "	routed_start	echo "."		;;stop)	echo -n "Ripd stop : "	/usr/bin/killall routedv1	/usr/bin/killall routedv2	echo "."	;;restart)	$0 stop	$0 start	;;*)	echo "Usage: /sbin/ripd {start|stop|restart}"	exit 1	;;esac

⌨️ 快捷键说明

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