Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 208245

Summary: sys-fs/udev scripts for OpenRC
Product: Gentoo Linux Reporter: Roy Marples <roy>
Component: [OLD] Core systemAssignee: udev maintainers <udev-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: betelgeuse
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: udev-start.sh
udev-stop.sh

Description Roy Marples 2008-01-30 22:50:57 UTC
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 Roy Marples 2008-01-30 22:51:21 UTC
Created attachment 142238 [details]
udev-start.sh
Comment 2 Roy Marples 2008-01-30 22:51:38 UTC
Created attachment 142239 [details]
udev-stop.sh
Comment 3 Roy Marples 2008-01-31 07:32:30 UTC
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 Roy Marples 2008-01-31 23:43:12 UTC
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 Matthias Schwarzott gentoo-dev 2008-02-02 20:37:18 UTC
Added scripts based on these to udev-118-r2.