Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 44 lines (41 sloc) 1.29 KB
#!/bin/sh
#---------------------------------------------------------------
# Project : netprofile
# Module : netprofile
# File : netprofile
# Version : $Id: netprofile,v 1.3 2003/05/26 07:32:12 flepied Exp $
# Author : Frederic Lepied
# Created On : Mon Mar 24 22:32:39 2003
#---------------------------------------------------------------
# chkconfig: 345 - 99
# description: Switch configuration file profile using \
# either the PROFILE environment variable \
# or the kernel command line (looking for PROFILE=)
# This pseudo-service is run before every other.
#---------------------------------------------------------------
case $1 in
start)
if [ -z "$PROFILE" ] ; then
# Check the kernel command line, profile are selectable
# right from the boot manager
eval `cat /proc/cmdline | tr ' ' '\n' | grep PROFILE`
fi
if [ -n "$PROFILE" ] ; then
set-netprofile $PROFILE
fi
touch /var/lock/subsys/netprofile
;;
stop)
rm -f /var/lock/subsys/netprofile
;;
restart)
$0 stop
$0 start
;;
status|reload)
;;
*)
echo "start|stop|restart|status"
;;
esac
# netprofile ends here