Blob Blame Raw
#!/bin/bash -
#
# akmodinit     Builds and install new kmods from akmod packages
#
# Author:       Thorsten Leemhuis <fedora@leemhuis.info>
#
# chkconfig:    2345 5 95
#
# description:  akmodsinit calls akmod during system boot to build and install
#               kmods for the currently running kernel if neccessary.
#
# processname:  akmodsd
# pidfile:      /var/run/akmodsd.pid
#

### BEGIN INIT INFO
# Provides: akmodsd
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Builds and install new kmods from akmod packages
# Description: akmodsinit calls akmod during system boot to build and install
#              kmods for the currently running kernel if neccessary.
### END INIT INFO

start_akmods ()
{
	# build and install all kmods if neccessary
	# for the currently running kernel (default in akmods)
	/usr/sbin/akmods --from-init
}


# See how we were called.
case "$1" in
	start|restart|reload|condrestart)
		start_akmods
		;;
	stop|status)
		exit 0
		;;
	*)
		echo $"Usage: $0 start"
		exit 2
		;;
esac