* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
@ 2003-12-16 17:23 ` Greg KH
2003-12-16 17:31 ` Rob Love
` (6 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2003-12-16 17:23 UTC (permalink / raw)
To: linux-hotplug
On Tue, Dec 16, 2003 at 06:11:14PM +0100, Marco d'Itri wrote:
> On Dec 16, Rob Love <rml@ximian.com> wrote:
>
> >Attached patch installs the initscript via 'make install' and adds it to
> >the RPM package. The RPM script then runs chkconfig(8) to setup the
> >initscript to run at the appropriate runlevels.
> The red hat script distributed by the udev package is very red hat
> specific. Are you sure this is a good idea?
Why not, I don't see people running other distros sending me patches :)
Seriously, if debian has problems with this, please let me know. Making
a "universal" init.d script seems pretty much impossible these days, so
I'll be glad to collect differing versions for different distros. I
know I've gotten a few complaints from SuSE users on the existing
script, which fails for them.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 10+ messages in thread* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
2003-12-16 17:23 ` Greg KH
@ 2003-12-16 17:31 ` Rob Love
2003-12-16 23:31 ` Greg KH
` (5 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Rob Love @ 2003-12-16 17:31 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2003-12-16 at 12:23, Greg KH wrote:
> Why not, I don't see people running other distros sending me patches :)
>
> Seriously, if debian has problems with this, please let me know. Making
> a "universal" init.d script seems pretty much impossible these days, so
> I'll be glad to collect differing versions for different distros. I
> know I've gotten a few complaints from SuSE users on the existing
> script, which fails for them.
I want to get it running on SuSE, too.
But non-RPM distros do not install the RPM, anyhow... I would not be
adverse to putting the installation of the initscript in the Makefile
around a conditional on INSTALL_RPM or something.
Rob Love
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 10+ messages in thread* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
2003-12-16 17:23 ` Greg KH
2003-12-16 17:31 ` Rob Love
@ 2003-12-16 23:31 ` Greg KH
2003-12-17 0:13 ` Marco d'Itri
` (4 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2003-12-16 23:31 UTC (permalink / raw)
To: linux-hotplug
On Tue, Dec 16, 2003 at 12:03:07PM -0500, Rob Love wrote:
> Hi, Greg.
>
> Attached patch installs the initscript via 'make install' and adds it to
> the RPM package. The RPM script then runs chkconfig(8) to setup the
> initscript to run at the appropriate runlevels.
>
> Por favor, please apply.
Applied, with some tweaks by hand, as someone else had already sent me
almost this whole patch.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 10+ messages in thread* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
` (2 preceding siblings ...)
2003-12-16 23:31 ` Greg KH
@ 2003-12-17 0:13 ` Marco d'Itri
2003-12-17 1:01 ` Greg KH
` (3 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Marco d'Itri @ 2003-12-17 0:13 UTC (permalink / raw)
To: linux-hotplug
On Dec 16, Greg KH <greg@kroah.com> wrote:
>Why not, I don't see people running other distros sending me patches :)
As I explained, most debian maintainers prefer to keep debian-specific
code in the debian source packages.
If you think there is a good reason to ship with udev the red hat init
script I see nothing wrong with this as long as it's labeled as
distribution-specific code, or it will confuse users.
This one of the init script is obviously a minor detail, as it's just a
stand alone script which I had to rewrote anyway because debian keeps
in /usr some tool your one uses.
I agree with Rob Love that this init script should be installed only
when building the RPM, as it appears to work only on red hat systems.
>Seriously, if debian has problems with this, please let me know. Making
>a "universal" init.d script seems pretty much impossible these days, so
Actually I would be *very* surprised if the init script I wrote for
debian (which I sent you a few weeks ago) did not work with every
distribution.
--
ciao, |
Marco | [3646 lukGrDRgQSpcQ]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 10+ messages in thread* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
` (3 preceding siblings ...)
2003-12-17 0:13 ` Marco d'Itri
@ 2003-12-17 1:01 ` Greg KH
2003-12-17 8:28 ` Marco d'Itri
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2003-12-17 1:01 UTC (permalink / raw)
To: linux-hotplug
On Wed, Dec 17, 2003 at 01:13:42AM +0100, Marco d'Itri wrote:
> >Seriously, if debian has problems with this, please let me know. Making
> >a "universal" init.d script seems pretty much impossible these days, so
> Actually I would be *very* surprised if the init script I wrote for
> debian (which I sent you a few weeks ago) did not work with every
> distribution.
Can you resend it? I don't seem to be able to find it anymore.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 10+ messages in thread* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
` (4 preceding siblings ...)
2003-12-17 1:01 ` Greg KH
@ 2003-12-17 8:28 ` Marco d'Itri
2003-12-17 15:46 ` Rob Love
2003-12-17 18:11 ` Greg KH
7 siblings, 0 replies; 10+ messages in thread
From: Marco d'Itri @ 2003-12-17 8:28 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
On Dec 17, Greg KH <greg@kroah.com> wrote:
>> Actually I would be *very* surprised if the init script I wrote for
>> debian (which I sent you a few weeks ago) did not work with every
>> distribution.
>Can you resend it? I don't seem to be able to find it anymore.
Here it is.
There is a bug I have not fixed yet (it breaks if /sys/class/video4linux/
does not exist).
--
ciao, |
Marco | [3649 grArswY7ca0qI]
[-- Attachment #2: udev --]
[-- Type: text/plain, Size: 1524 bytes --]
#!/bin/sh -e
PATH=/sbin:/bin:/usr/sbin:/usr/bin
UDEV=/sbin/udev
[ -x $UDEV -a -e /proc/sys/kernel/hotplug ] || exit 0
[ -c /dev/.devfsd ] && exit 0
case "$(uname -r)" in
2.[01234].*)
echo "udev requires a 2.6.x kernel, not started."
exit 0
;;
esac
mount_sysfs() {
[ -d /sys ] || mkdir /sys
[ -d /sys/class ] || mount -t sysfs sysfs: /sys
}
synthesize_events() {
echo -n "Creating initial udev device nodes..."
export ACTION=add
# add tty devices
for i in /sys/class/tty/* /sys/class/video4linux/*; do
export DEVPATH=${i#/sys}
# echo -n " $DEVPATH"
$UDEV tty
done
# add block devices and their partitions
for i in /sys/block/*; do
export DEVPATH=${i#/sys}
# echo -n " $DEVPATH"
$UDEV block
for j in $i/*; do
[ -f "$j/dev" ] || continue
export DEVPATH=${j#/sys}
# echo -n " $DEVPATH"
$UDEV block
done
done
echo "done."
return 0
}
case "$1" in
start|restart|force-reload)
[ -d /udev ] || mkdir /udev
mount_sysfs
synthesize_events
if [ "$(cat /proc/sys/kernel/hotplug)" = "/sbin/hotplug" ]; then
:
else
echo $UDEV > /proc/sys/kernel/hotplug
echo "/dev management daemon (udev) enabled."
fi
;;
stop)
if [ "$(cat /proc/sys/kernel/hotplug)" = "$UDEV" ]; then
echo /bin/true > /proc/sys/kernel/hotplug
echo "/dev management daemon (udev) disabled."
fi
;;
*)
echo "Usage: /etc/init.d/udev {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
` (5 preceding siblings ...)
2003-12-17 8:28 ` Marco d'Itri
@ 2003-12-17 15:46 ` Rob Love
2003-12-17 18:11 ` Greg KH
7 siblings, 0 replies; 10+ messages in thread
From: Rob Love @ 2003-12-17 15:46 UTC (permalink / raw)
To: linux-hotplug
On Wed, 2003-12-17 at 03:28, Marco d'Itri wrote:
> Here it is.
> There is a bug I have not fixed yet (it breaks if /sys/class/video4linux/
> does not exist).
Maybe this is what I am seeing, but I took a diff of the results in
/udev from the current initscript and your's, and I am missing a bunch
of stuff. The diff is below.
But this does, otherwise, work on Red Hat, although it obviously does
not follow the style or anything of the regular Red Hat initscripts.
Rob Love
--- dog 2003-12-17 10:43:28.000000000 -0500
+++ fox 2003-12-17 10:44:10.798297408 -0500
@@ -1,292 +1,5 @@
console
-hda
-hda1
-hda2
-hda3
-hdc
-loop0
-loop1
-loop2
-loop3
-loop4
-loop5
-loop6
-loop7
-md0
ptmx
-ram0
-ram1
-ram10
-ram11
-ram12
-ram13
-ram14
-ram15
-ram2
-ram3
-ram4
-ram5
-ram6
-ram7
-ram8
-ram9
-rfcomm0
-rfcomm1
-rfcomm10
-rfcomm100
-rfcomm101
-rfcomm102
-rfcomm103
-rfcomm104
-rfcomm105
-rfcomm106
-rfcomm107
-rfcomm108
-rfcomm109
-rfcomm11
-rfcomm110
-rfcomm111
-rfcomm112
-rfcomm113
-rfcomm114
-rfcomm115
-rfcomm116
-rfcomm117
-rfcomm118
-rfcomm119
-rfcomm12
-rfcomm120
-rfcomm121
-rfcomm122
-rfcomm123
-rfcomm124
-rfcomm125
-rfcomm126
-rfcomm127
-rfcomm128
-rfcomm129
-rfcomm13
-rfcomm130
-rfcomm131
-rfcomm132
-rfcomm133
-rfcomm134
-rfcomm135
-rfcomm136
-rfcomm137
-rfcomm138
-rfcomm139
-rfcomm14
-rfcomm140
-rfcomm141
-rfcomm142
-rfcomm143
-rfcomm144
-rfcomm145
-rfcomm146
-rfcomm147
-rfcomm148
-rfcomm149
-rfcomm15
-rfcomm150
-rfcomm151
-rfcomm152
-rfcomm153
-rfcomm154
-rfcomm155
-rfcomm156
-rfcomm157
-rfcomm158
-rfcomm159
-rfcomm16
-rfcomm160
-rfcomm161
-rfcomm162
-rfcomm163
-rfcomm164
-rfcomm165
-rfcomm166
-rfcomm167
-rfcomm168
-rfcomm169
-rfcomm17
-rfcomm170
-rfcomm171
-rfcomm172
-rfcomm173
-rfcomm174
-rfcomm175
-rfcomm176
-rfcomm177
-rfcomm178
-rfcomm179
-rfcomm18
-rfcomm180
-rfcomm181
-rfcomm182
-rfcomm183
-rfcomm184
-rfcomm185
-rfcomm186
-rfcomm187
-rfcomm188
-rfcomm189
-rfcomm19
-rfcomm190
-rfcomm191
-rfcomm192
-rfcomm193
-rfcomm194
-rfcomm195
-rfcomm196
-rfcomm197
-rfcomm198
-rfcomm199
-rfcomm2
-rfcomm20
-rfcomm200
-rfcomm201
-rfcomm202
-rfcomm203
-rfcomm204
-rfcomm205
-rfcomm206
-rfcomm207
-rfcomm208
-rfcomm209
-rfcomm21
-rfcomm210
-rfcomm211
-rfcomm212
-rfcomm213
-rfcomm214
-rfcomm215
-rfcomm216
-rfcomm217
-rfcomm218
-rfcomm219
-rfcomm22
-rfcomm220
-rfcomm221
-rfcomm222
-rfcomm223
-rfcomm224
-rfcomm225
-rfcomm226
-rfcomm227
-rfcomm228
-rfcomm229
-rfcomm23
-rfcomm230
-rfcomm231
-rfcomm232
-rfcomm233
-rfcomm234
-rfcomm235
-rfcomm236
-rfcomm237
-rfcomm238
-rfcomm239
-rfcomm24
-rfcomm240
-rfcomm241
-rfcomm242
-rfcomm243
-rfcomm244
-rfcomm245
-rfcomm246
-rfcomm247
-rfcomm248
-rfcomm249
-rfcomm25
-rfcomm250
-rfcomm251
-rfcomm252
-rfcomm253
-rfcomm254
-rfcomm255
-rfcomm26
-rfcomm27
-rfcomm28
-rfcomm29
-rfcomm3
-rfcomm30
-rfcomm31
-rfcomm32
-rfcomm33
-rfcomm34
-rfcomm35
-rfcomm36
-rfcomm37
-rfcomm38
-rfcomm39
-rfcomm4
-rfcomm40
-rfcomm41
-rfcomm42
-rfcomm43
-rfcomm44
-rfcomm45
-rfcomm46
-rfcomm47
-rfcomm48
-rfcomm49
-rfcomm5
-rfcomm50
-rfcomm51
-rfcomm52
-rfcomm53
-rfcomm54
-rfcomm55
-rfcomm56
-rfcomm57
-rfcomm58
-rfcomm59
-rfcomm6
-rfcomm60
-rfcomm61
-rfcomm62
-rfcomm63
-rfcomm64
-rfcomm65
-rfcomm66
-rfcomm67
-rfcomm68
-rfcomm69
-rfcomm7
-rfcomm70
-rfcomm71
-rfcomm72
-rfcomm73
-rfcomm74
-rfcomm75
-rfcomm76
-rfcomm77
-rfcomm78
-rfcomm79
-rfcomm8
-rfcomm80
-rfcomm81
-rfcomm82
-rfcomm83
-rfcomm84
-rfcomm85
-rfcomm86
-rfcomm87
-rfcomm88
-rfcomm89
-rfcomm9
-rfcomm90
-rfcomm91
-rfcomm92
-rfcomm93
-rfcomm94
-rfcomm95
-rfcomm96
-rfcomm97
-rfcomm98
-rfcomm99
-sr0
tty
tty0
tty1
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 10+ messages in thread* Re: [patch] install initscript in udev rpm
2003-12-16 17:11 Marco d'Itri
` (6 preceding siblings ...)
2003-12-17 15:46 ` Rob Love
@ 2003-12-17 18:11 ` Greg KH
7 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2003-12-17 18:11 UTC (permalink / raw)
To: linux-hotplug
On Wed, Dec 17, 2003 at 09:28:40AM +0100, Marco d'Itri wrote:
> On Dec 17, Greg KH <greg@kroah.com> wrote:
>
> >> Actually I would be *very* surprised if the init script I wrote for
> >> debian (which I sent you a few weeks ago) did not work with every
> >> distribution.
> >Can you resend it? I don't seem to be able to find it anymore.
>
> Here it is.
> There is a bug I have not fixed yet (it breaks if /sys/class/video4linux/
> does not exist).
Take a look at the udev script or the test.all script in the 009
release. It catches all devices in the sysfs tree, and no longer
requires different systems to be added to the script by hand.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&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] 10+ messages in thread