HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //etc/rc6.d/K04dkms_autoinstaller
#!/bin/sh
#
# dkms_autoinstaller - A service to automatically install DKMS modules for new kernels.
#
# chkconfig: 345 04 04
# description: Compiles and install kernel modules automatically for new \
#              kernels at boot.

# http://fedoraproject.org/wiki/FCNewInit/Initscripts
### BEGIN INIT INFO
# Provides: dkms_autoinstaller dkms
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Required-Start: $local_fs
# Short-Description: DKMS kernel modules installer service
# Description: A service to automatically install DKMS modules for new kernels.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

exec="/usr/sbin/dkms"
prog=${exec##*/}

[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

start() {
    echo -n $"Starting $prog: "
    dkms autoinstall --kernelver $(uname -r)
    retval=$?
    echo
    [ $retval -eq 0 ]
    return $retval
}

case "$1" in
    start)
        $1
        ;;
    stop)
        # There is no stop action, this and the 04 priority during stop is
        # added to make chkconfig happy.
        ;;
    *)
        echo $"Usage: $0 {start|stop}"
        exit 2
esac