c1a53c5
#!/bin/bash -
c1a53c5
#
c1a53c5
# akmodinit     Builds and install new kmods from akmod packages
c1a53c5
#
c1a53c5
# Author:       Thorsten Leemhuis <fedora@leemhuis.info>
c1a53c5
#
c1a53c5
# chkconfig:    2345 5 95
c1a53c5
#
c1a53c5
# description:  akmodsinit calls akmod during system boot to build and install
c1a53c5
#               kmods for the currently running kernel if neccessary.
c1a53c5
#
c1a53c5
# processname:  akmodsd
c1a53c5
# pidfile:      /var/run/akmodsd.pid
c1a53c5
#
c1a53c5
c1a53c5
### BEGIN INIT INFO
c1a53c5
# Provides: akmodsd
c1a53c5
# Required-Start: $local_fs
c1a53c5
# Required-Stop: $local_fs
c1a53c5
# Default-Start: 2 3 4 5
c1a53c5
# Default-Stop: 0 1 6
c1a53c5
# Short-Description: Builds and install new kmods from akmod packages
c1a53c5
# Description: akmodsinit calls akmod during system boot to build and install
c1a53c5
#              kmods for the currently running kernel if neccessary.
c1a53c5
### END INIT INFO
c1a53c5
c1a53c5
start_akmods ()
c1a53c5
{
c1a53c5
	# build and install all kmods if neccessary
c1a53c5
	# for the currently running kernel (default in akmods)
c1a53c5
	/usr/sbin/akmods --from-init
c1a53c5
}
c1a53c5
c1a53c5
c1a53c5
# See how we were called.
c1a53c5
case "$1" in
c1a53c5
	start|restart|reload|condrestart)
c1a53c5
		start_akmods
c1a53c5
		;;
c1a53c5
	stop|status)
c1a53c5
		exit 0
c1a53c5
		;;
c1a53c5
	*)
c1a53c5
		echo $"Usage: $0 start"
cbb8433
		exit 2
c1a53c5
		;;
c1a53c5
esac