#!/bin/sh # # config-kernel # # Author: Chris Green # # chkconfig: 345 61 01 # # description: Enable automatic kernel-module compilation: # requires AFS access. # # source function library . /etc/rc.d/init.d/functions config_kernel="/afs/fnal.gov/files/code/e898/scratch/27/Software/config-kernel/config-kernel" log_file="/var/cache/config-kernel/config-kernel.log" start() { action "Configuring kernel (startup):" ${config_kernel} -L && \ /bin/touch /var/lock/subsys/config-kernel } stop() { action "Configuring kernel (shutdown):" ${config_kernel} -L /bin/rm -f /var/lock/subsys/config-kernel } case "$1" in start) start ;; stop) stop ;; *) echo "*** Usage: config-kernel.init {start|stop}" exit 1 esac exit 0