#!/bin/sh # chkconfig: 345 01 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 [ "$PROFILE" != "" ] ; then linuxconf --selectprofile $PROFILE else # Check the kernel command line, profile are selectable # right from the boot manager eval `cat /proc/cmdline | tr ' ' '\n' | grep PROFILE` if [ "$PROFILE" != "" ] ; then linuxconf --selectprofile $PROFILE fi fi ;; stop) ;; restart) $0 stop $0 start ;; status) ;; *) echo "start|stop|restart|status" ;; esac