#!/bin/sh #pragma ident "@(#)linux-check-prereq 1.1 98/09/01" echo "To run the Mobile IP software, your kernel must support:" echo " - the proc file-system" echo " - dynamically loadable kernel modules" echo " - TCP/IP networking" echo " - IP forwarding" echo " - IP multicast" echo " - IP aliasing" echo " - IPinIP tunneling (as a module)" echo " - and network devices appropriate for your hardware" RESULT=1 # Check the /proc file system. if [ -r /proc/version ] ; then echo "Kernel supports the proc filesystem (good)." else echo "Proc filesystem check failed." RESULT=0 fi if [ -r /proc/modules ] ; then echo "Kernel supports dynamically loadable modules (good)." else echo "Module support check failed." RESULT=0 fi if [ -r /proc/net/route -a -r /proc/net/arp ] ; then echo "Kernel supports TCP/IP networking (good)." else echo "TCP/IP networking check failed." RESULT=0 fi if [ -r /proc/sys/net/ipv4/ip_forward ] ; then echo "Kernel supports IP forwarding (good)." else echo "IP forwarding check failed." RESULT=0 fi if [ -r /proc/net/igmp ] ; then echo "Kernel supports IP multicast (good)." else echo "IP multicast check failed." RESULT=0 fi if [ -r /proc/net/aliases ] ; then echo "Kernel supports IP aliasing (good)." else echo "IP aliasing check failed." RESULT=0 fi if [ -r /sbin/ifconfig -a -r /sbin/route -a -r /sbin/insmod -a -r \ /sbin/rmmod ] ; then echo "Found necessary utilities -- ifconfig, route, insmod, rmmod (good)." else echo "One or more of the following -- ifconfig, route, insmod, rmmod -- " echo "appear to be missing." RESULT=0 fi /sbin/insmod ipip COUNT=`more /proc/modules | grep ipip | wc -l` if [ $COUNT != 0 ] ; then echo "Kernel has loadable ipip module (good)." else echo "Kernel does not have a loadable ipip module." RESULT=0 fi /sbin/rmmod ipip /sbin/insmod -o tunl0 new_tunnel COUNT=`more /proc/modules | grep tunl0 | wc -l` if [ $COUNT != 0 ] ; then echo "Kernel has loadable new_tunnel module (good)." else echo "Kernel does not have a loadable new_tunnel module." RESULT=0 fi /sbin/rmmod tunl0 if [ $RESULT != 1 ] ; then echo "Your kernel is missing some features required by Mobile IP." else echo "Your kernel satisfies the necessary pre-requisities for Mobile IP." fi