[Lunar-commits] CVS: moonbase/kernel/modutils-wrappers/init.d modutils, NONE, 1.1

Jaime Buffery nestu at lunar-linux.org
Thu Jan 13 12:43:48 UTC 2005


Update of /var/cvs/lunar/moonbase/kernel/modutils-wrappers/init.d
In directory espresso.foo-projects.org:/tmp/cvs-serv11223/modutils-wrappers/init.d

Added Files:
	modutils 
Log Message:
Initial import :)


--- NEW FILE: modutils ---
#!/bin/bash

# modutils    - load modules at startup
# description: modutils, boot time module loading

start () {
  echo  "Loading modules."

  if  [  -x  /sbin/depmod  ];  then

    echo    -n  " * Updating Module Dependencies"
    depmod -a &> /dev/null         &&
      echo -e $RESULT_OK           ||
      echo -e $RESULT_FAIL

  fi

  if  [  -e  /etc/modules    ]   &&
      [  -x  /sbin/modprobe  ];  then

    while  read  MODULE ARGS;  do
      case  $MODULE in
        \#*|"")  continue  ;;
      esac
      echo -n " * Loading module: $MODULE"
      modprobe $MODULE $ARGS &> /dev/null		&&
        echo -e $RESULT_OK					||
        echo -e $RESULT_FAIL
    done < /etc/modules
  fi
}

stop () {
     exit 0
}

status () {
       lsmod
}

case $1 in
   start|stop|status) ;;
   *)		        echo "Usage: $0 {start|stop|status}"; exit 1  ;;
esac

. /lib/lsb/init-functions





More information about the Lunar-commits mailing list