rc.scc.
#!/bin/sh
# Get config
. /etc/rc.d/axdefs
atscc () {
UP=`${SDIR}/ifconfig scc3 | grep RUNNING | head -n1 | awk '{ print $2 }'`
if [ "$UP" = "RUNNING" ]; then
echo "Interface scc3 is up and running..."
else
${SDIR}/ifconfig scc3 ${IPADDR} hw ax25 pa3gcu-15
${SDIR}/route del -net ${NETWORK} netmask ${NETMASK} scc3
fi
}
rit () {
OK=`${SDIR}/route -ne | grep scc3 | grep ${GATEWAY} | awk '{ print $1}'`
if [ "$OK" = "${GATEWAY}" ]; then
echo "Routes are in place..."
${SDIR}/route -ne | grep scc3
else
${SDIR}/route add ${GATEWAY} ${MSS} ${WINDOW} ${IRTT} scc3
${SDIR}/route add 44.137.28.91 ${MSS} ${WINDOW} ${IRTT} scc3
fi
}
case "$1" in
up)
# Make sure scc.o is loaded
SC=`${SDIR}/lsmod | grep scc | wc -c`
if [ "$SC" -gt "0" ]; then
atscc
rit
else
${SDIR}/modprobe scc
${SDIR}/sccinit
atscc
rit
fi
;;
down)
ifconfig scc3 down
;;
stats)
UP=`${SDIR}/ifconfig scc3 | grep RUNNING | head -n1 | awk '{ print $2 }'`
if [ "$UP" = "RUNNING" ]; then
echo "Interface scc3 is up and running..."
echo ""
${SDIR}/route -ne | grep scc3
echo ""
echo "Hit enter to continue..."
read x
${SDIR}/sccstat scc3
fi
;;
*)
echo "USAGE: ./rc.scc up | down | stats "
esac
Back to ax25-description page.