lkml.org 
[lkml]   [1998]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: kmod/kerneld
On Wed, 11 Mar 1998, Myrdraal wrote:

# > What do I do with /sbin/kerneld.

# You could make it check uname or something to see if it's 2.0.33 and if so
# run kerneld, otherwise don't.

I modified my startup script like this (checks for
/proc/sys/kernel/modprobe).

#!/bin/sh
#
# $Id: _kerneld,v 1.2 1998/02/13 21:28:07 root Exp nicholas $
#
# actually, we'll handle both kmod and kerneld

PATH=/bin:/sbin

case $1 in
'start')
if [ -f /etc/modules.conf ]; then
depmod -a

# first kmod
if [ -f /proc/sys/kernel/modprobe ]; then
echo 'Using kmod'
echo '/sbin/modprobe' > /proc/sys/kernel/modprobe
echo 60 > /proc/sys/kernel/kmod_unload_delay
else
echo 'Using kerneld'
kerneld
sleep 2
fi
fi
;;

'stop')
if [ -f /etc/modules.conf ]; then
# first kmod
if [ -f /proc/sys/kernel/modprobe ]; then
echo '/bin/false' > /proc/sys/kernel/modprobe
echo 0 > /proc/sys/kernel/kmod_unload_delay
else
killall kerneld
fi
fi
;;

'restart')
echo 'Restarting'
sh $0 stop
sleep 2
exec sh $0 start
;;

*)
exec /bin/sh $0 start
;;
esac


___________________________________________________________________________

simple is elegant mrnick.binary9.net nicholas@binary9.net
___________________________________________________________________________


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.701 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site