#! /bin/sh # /etc/rc.d/rc.inet1-pre # # This script is used to bring up the various network interfaces or # to create virtual network interfaces. This script is called before # the regular interfaces are configured. start() { : # Create a tap interface #/sbin/modprobe tun #/sbin/ip tuntap add dev tap1 mode tap } stop() { : # Remove a tap interface #/sbin/ip tuntap del dev tap1 mode tap } ############ ### MAIN ### ############ case "$1" in 'start') # "start" brings up all configured interfaces: start ;; 'stop') # "stop" takes down all configured interfaces: stop ;; 'restart') # "restart" restarts the network: stop start ;; *) # The default is to start: start esac # End of /etc/rc.d/rc.inet1-pre