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