Bug 208245 - sys-fs/udev scripts for OpenRC
Bug#: 208245 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: udev-bugs@gentoo.org Reported By: roy@marples.name
Component: Core system
URL: 
Summary: sys-fs/udev scripts for OpenRC
Keywords:  
Status Whiteboard: 
Opened: 2008-01-30 22:50 0000
Description:   Opened: 2008-01-30 22:50 0000
The udev-start.sh and udev-stop.sh scripts as supplied by udev could do with a
little make over to use some handy features from OpenRC.

Use the yesno function instead of testing $VAR = "YES".
Use start-stop-daemon to start udev.
Use sed and not awk.
Try not to hardcode any paths.
Stop using the redundant try function.
Don't attempt any fstab parsing or have any fancy options. If any are required
beyond the defaults then simply add/edit the entry in /etc/fstab.

If udev requires any specific kernel version or features, then the udev binary
should test for this as it can do a much better job than any shell script. A
note has been added to udev-start.sh to indicate this.

These scripts should be installed to /lib/rc/addons
OpenRC will use them over ones found in /lib/rcscripts/addons

------- Comment #1 From Roy Marples 2008-01-30 22:51:21 0000 -------
Created an attachment (id=142238) [details]
udev-start.sh

------- Comment #2 From Roy Marples 2008-01-30 22:51:38 0000 -------
Created an attachment (id=142239) [details]
udev-stop.sh

------- Comment #3 From Roy Marples 2008-01-31 07:32:30 0000 -------
It should be noted that those files are from my amd64 and have /lib64 hardcoded
in them - that of course should be adjusted by the ebuild :)

------- Comment #4 From Roy Marples 2008-01-31 23:43:12 0000 -------
I forgot to mention these are for OpenRC only. They will not work with any
baselayout in portage due to missing functions such as yesno and the lowercase
variables in play now.

------- Comment #5 From Matthias Schwarzott 2008-02-02 20:37:18 0000 -------
Added scripts based on these to udev-118-r2.