Device nodes (Manually Created )are removed at boot -time
Antonio Olivares
olivares14031 at yahoo.com
Sat Dec 17 17:26:02 UTC 2005
--- Parameshwara Bhat <peebhat at gmail.com> wrote:
> Hello List,
>
> My modem driver-needed to be built from
> source-created device nodes like
> /dev/slamr0 ,/dev/slusb0.When I rebooted I found
> these nodes cleared and
8> the daemon slmodemd dead.
Use as superuser
$ su -
psswd ******
run
# ungrab-winmodem
# modprobe slamr
# cp /dev/slamr0 /etc/udev/devices and/or
# cp /dev/slusb0 /etc/udev/devices
>
> I also need to install modules ungrab-winmodem and
> slamr in that order and
> I have put them in /etc/modprobe.conf in that
> order.If the order is
> reversed,slamr is grabbed by the kernel.But on
> rebooting,I found in the
> messages slamr grabbed by the kernel.Obviuosly,
> module slamr got loaded
> first.
>
> It appears there is some process earlier which loads
> slamr module prior to
> the processing of /etc/modprobe.conf.
You do not need to include it in /etc/modprobe.conf.
It is not needed with kernels > 2.6.
>
> The sequence I want is,
> 1.Load ungrab module
> 2.load slamr module
> 3.run init process /etc/init.d/slmodemd
>
> This used to occur in this sequence in FC1 through
> FC2. I am having
> persistent problem in FC4.
>
> My knowledge of Boot process is not well enough to
> figure out what's going
> wrong.
>
Things changed a bit with ungrab-winmodem kernels >
2.6.10, and udev since FC3. Autoloading of drivers
changed somewhat. Try to use the script that follows.
In case you have trouble, please send another email.
>
> Thanks,
>
> Parameshwara Bhat
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe:
> https://www.redhat.com/mailman/listinfo/fedora-list
>
Modify the following /etc/init.d/slmodem, to suit your
needs.
[olivares at localhost ~]$ cat /etc/init.d/slmodemd
#!/bin/sh
#
# slmodemd: Starts the SmartLink Modem Daemon
#
# chkconfig: 345 90 10
# description: This is the user space part of the
SmartLink Modem driver
# processname: slmodemd
# config: /etc/sysconfig/slmodem
# Source function library.
. /etc/init.d/functions
prog=slmodemd
RETVAL=0
# Default configuration
SLMODEMD_DEVICE=slamr0
SLMODEMD_COUNTRY=USA
# Source configuration
CONFIG=/etc/sysconfig/$prog
if [ -f $CONFIG ]; then
. $CONFIG
# override default group and permissions if
defined in $CONFIG;
# other valid options also can be put into
SLMODEMD_OPTS variable
[ "$GROUP" ] && SLMODEMD_OPTS="$SLMODEMD_OPTS
--group=$GROUP"
[ "$PERMS" ] && SLMODEMD_OPTS="$SLMODEMD_OPTS
--perm=$PERMS"
fi
# uncomment this if you want this feature (if
necessary edit module pattern):
# do not try to start on a kernel which does not
support it
# grep -q 'slamr\..*o' /lib/modules/`uname
-r`/modules.dep || exit 0
start() {
cat /proc/modules | grep 'ungrab-winmodem'
>/dev/null || {
echo -n "Ungrabbing winmodem from kernel ...
"
modprobe ungrab-winmodem && echo "done." ||
{
echo "failed."
exit -1
}
}
modprobe slamr
rmmod slamr
sleep 3
cat /proc/modules | grep 'slamr' >/dev/null ||
{
echo -n "Loading SmartLink Modem driver into
kernel ... "
modprobe slamr && echo "done." || {
echo "failed."
exit -1
}
}
echo -n "Starting SmartLink Modem driver for
$SLMODEMD_DEVICE: "
$prog </dev/null >/dev/null 2>/dev/null \
--country=$SLMODEMD_COUNTRY $SLMODEMD_OPTS
/dev/$SLMODEMD_DEVICE &
RETVAL=$?
[ $RETVAL -eq 0 ] && success $"$prog startup"
|| failure $"$prog startup"
echo
[ $RETVAL -eq 0 ] && touch
/var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n "Shutting down SmartLink Modem driver:
"
killproc $prog
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f
/var/lock/subsys/$prog
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
RETVAL=$?
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/$prog ]; then
stop
start
RETVAL=$?
fi
;;
*)
echo "*** Usage: $prog
{start|stop|status|restart|condrestart}"
exit 1
esac
exit $RETVAL
[olivares at localhost ~]$
Hope this helps,
Antonio
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the fedora-list
mailing list