From: md@Linux.IT (Marco d'Itri)
To: linux-hotplug@vger.kernel.org
Subject: Re: ide.rc
Date: Mon, 01 Nov 2004 01:47:24 +0000 [thread overview]
Message-ID: <20041101014724.GA22438@wonderland.linux.it> (raw)
In-Reply-To: <20041029141509.GA9119@wonderland.linux.it>
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
On Oct 30, "Alexander E. Patrakov" <patrakov@ums.usu.ru> wrote:
> This script would be probably a bit wrong for my old server. This server has a
> LSI Logic SCSI adapter (with two hard disks attached) and a ServerWorks IDE
> adapter with one attached CD-ROM drive. For some strange reason, to use this
> CD-ROM, I must have both serverworks, ide_generic and ide_cd modules loaded.
> Your script won't load ide_generic. The kernel is 2.6.7-1-686.
As it has been explained, this is probably a bug/feature in the
serverworks driver. The correct solution would be for the debian kernel
package to ship a /etc/modprobe.d/kernel-image-2.6.7-1-686 file
containing something like:
install serverworks /sbin/modprobe --ignore-install serverworks && { /sbin/modprobe ide-generic; /sbin/modprobe ide-cd; }
(Do you mind opening a bug about this in the debian BTS?)
> Also, your script starts before pci.rc (because "i" is before "p" in the
> alphabet) and therefore will not find anything on my old server at all (the
> serverworks module is loaded by pci.rc).
Good point. tsort(1) comes to help, as you can see in the attached
replacement for the main hotplug init script.
There is no ide.agent script because there are no "real" IDE hotplug
events from the kernel. Probably there is no need for them, this is
just a workaround to load the modules for udev.
--
ciao, |
Marco | [8851 soOFdKlIC1OSk]
[-- Attachment #2: hotplug.init --]
[-- Type: text/plain, Size: 1649 bytes --]
#!/bin/sh -e
#
# description: Starts and stops each hotpluggable subsystem.
# On startup, may simulate hotplug events for devices
# that were present at boot time, before filesystems
# used by /sbin/hotplug became available.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
[ -x /sbin/hotplug ] || exit 0
if [ ! -f /proc/sys/kernel/hotplug ]; then
echo "Kernel hotplug support not enabled."
exit 0
fi
[ -e /etc/default/hotplug ] && . /etc/default/hotplug
run_rcs() {
SUBSYSTEMS=$(
{
for RC in /etc/hotplug/*.rc; do
basename=${RC#/etc/hotplug/}
name=${basename%.rc}
echo "$name $name"
done
# follows couples of ordered elements
echo "ide pci"
echo "usb pci"
} | tsort | tac
)
for name in $SUBSYSTEMS; do
printf " %-8s\n" $name
if [ "$(eval echo \$HOTPLUG_RC_$name)" = no ]; then
printf " %-8s [disabled]\n" $name
continue
fi
set +e
/etc/hotplug/$name.rc $1
RC_STATUS=$?
set -e
if [ "$1" = status ]; then
continue
fi
if [ $RC_STATUS = 0 ]; then
printf " %-8s [success]\n" $name
else
printf " %-8s [failed]\n" $name
fi
done
}
case "$1" in
start)
echo "Starting hotplug subsystem:"
echo /sbin/hotplug > /proc/sys/kernel/hotplug
run_rcs $1
echo "done"
;;
stop)
echo "Stopping hotplug subsystem:"
run_rcs $1
echo /bin/true > /proc/sys/kernel/hotplug
echo "done"
;;
restart|force-reload)
echo -n "Restarting hotplug subsystem:"
run_rcs stop
run_rcs start
echo "."
;;
status)
run_rcs $1
;;
*)
echo "Usage: $0 {start|stop|restart|status|force-reload}" >&2
exit 1
;;
esac
exit 0
next prev parent reply other threads:[~2004-11-01 1:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-29 14:15 ide.rc Marco d'Itri
2004-10-30 2:36 ` ide.rc Alexander E. Patrakov
2004-10-30 7:14 ` ide.rc Remco
2004-10-30 15:31 ` ide.rc Alexander E. Patrakov
2004-11-01 1:47 ` Marco d'Itri [this message]
2004-11-01 3:01 ` ide.rc Alexander E. Patrakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041101014724.GA22438@wonderland.linux.it \
--to=md@linux.it \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).