* Re: [PATCH] init.d script for debian
@ 2004-02-17 19:07 John L. Fjellstad
2004-02-17 19:56 ` Marco d'Itri
2004-02-17 21:05 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: John L. Fjellstad @ 2004-02-17 19:07 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 292 bytes --]
The /dev/null node gets removed to early, so than any subsequent
removal gets an error message about missing /dev/null. I moved
the removal of /dev/null to last, and added the previous patch
--
John L. Fjellstad
web: http://www.fjellstad.org/ Quis custodiet ipsos custodes
[-- Attachment #1.2: udev.debian.patch --]
[-- Type: text/plain, Size: 1591 bytes --]
--- udev.debian.orig 2004-02-13 02:01:37.000000000 +0100
+++ udev.debian 2004-02-17 20:05:07.000000000 +0100
@@ -45,6 +45,12 @@
# all other device classes
for i in ${sysfs_dir}/class/*; do
for j in $i/*; do
+ if [ $ACTION == "remove" ]; then
+ if [ $j == "${sysfs_dir}/class/mem/null" ]; then
+
+ continue;
+ fi
+ fi
if [ -f $j/dev ]; then
export DEVPATH=${j#${sysfs_dir}}
CLASS=`echo ${i#${sysfs_dir}} | \
@@ -53,6 +59,12 @@
fi
done
done
+
+ if [ $ACTION == "remove" ]; then
+ export DEVPATH=/class/mem/null;
+ CLASS=mem;
+ $bin $CLASS &
+ fi
}
@@ -61,13 +73,18 @@
if [ ! -d $udev_dir ]; then
mkdir $udev_dir
fi
- if [ ! -d $sysfs_dir ]; then
+ # don't use udev if sysfs is not mounted
+ if [ ! -d $sysfs_dir/block ]; then
exit 1
fi
# propogate /udev from /sys - we only need this while we do not
# have initramfs and an early user-space with which to do early
# device bring up
action "Creating initial udev device nodes: " /bin/true
+ if [ ! -c $udev_dir/null ]; then
+ action "Creating initial ${udev_dir}/null" /bin/true
+ /bin/mknod ${udev_dir}/null c 1 3
+ fi
export ACTION=add
run_udev
@@ -78,6 +95,7 @@
cd $udev_dir && ln -s fd/2 stderr
cd $udev_dir && ln -s /proc/kcore core
cd $udev_dir && ln -s /proc/asound/oss/sndstat sndstat
+
;;
stop)
# be careful
@@ -90,6 +108,7 @@
rm -f $udev_dir/stdout
rm -f $udev_dir/stdin
rm -f $udev_dir/fd
+ rm -f $udev_dir/memstick1
;;
status)
if [ -d $udev_dir ]; then
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] init.d script for debian
2004-02-17 19:07 [PATCH] init.d script for debian John L. Fjellstad
@ 2004-02-17 19:56 ` Marco d'Itri
2004-02-17 21:05 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Marco d'Itri @ 2004-02-17 19:56 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
On Feb 17, "John L. Fjellstad" <john-hotplug@fjellstad.org> wrote:
>The /dev/null node gets removed to early, so than any subsequent
>removal gets an error message about missing /dev/null. I moved
>the removal of /dev/null to last, and added the previous patch
Why remove it at all? It's not like its major/minor numbers are going to
change soon.
--
ciao, |
Marco | [4643 avnRuImWtqx66]
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] init.d script for debian
2004-02-17 19:07 [PATCH] init.d script for debian John L. Fjellstad
2004-02-17 19:56 ` Marco d'Itri
@ 2004-02-17 21:05 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-02-17 21:05 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 17, 2004 at 08:56:17PM +0100, Marco d'Itri wrote:
> On Feb 17, "John L. Fjellstad" <john-hotplug@fjellstad.org> wrote:
>
> >The /dev/null node gets removed to early, so than any subsequent
> >removal gets an error message about missing /dev/null. I moved
> >the removal of /dev/null to last, and added the previous patch
> Why remove it at all? It's not like its major/minor numbers are going to
> change soon.
Not yet, but in 2.7 it might... :)
thanks,
greg k-h
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-17 21:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-17 19:07 [PATCH] init.d script for debian John L. Fjellstad
2004-02-17 19:56 ` Marco d'Itri
2004-02-17 21:05 ` Greg KH
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).