Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292966 - sys-fs/udev-147 (and 146-r2?): /etc/init.d/udev wrongly reports startup being failed when hotplugging is disabled
Summary: sys-fs/udev-147 (and 146-r2?): /etc/init.d/udev wrongly reports startup being...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-13 00:34 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2009-11-13 19:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
udev-147.init.patch (udev-147.init.patch,222 bytes, patch)
2009-11-13 00:35 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-11-13 00:34:16 UTC
Hi,

after I upgraded udev to version 147 the udev init script always reports startup being failed although udevd is running. After some intensive research I found out that this is because of a missing "return 0" at the end of display_hotplugged_services() function.

Explanation:
When hotplugging is disabled via rc_hotplug="" in /etc/rc.conf the ${services} variable inside of the display_hotplugged_services() function stays empty. At the end of the function there's a test wether the variable is empty or not and that test returns 1 (false) when the variable is empty. As there's no explicit return statement at the end of the function the function returns with the value of the test for ${services} being empty.

A simple "return 0" at the end of the function can fix this.

Reproducible: Always

Steps to Reproduce:
1. install udev-147
2. set rc_hotplug="" in /etc/rc.conf
3. reboot
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-11-13 00:35:48 UTC
Created attachment 210093 [details, diff]
udev-147.init.patch
Comment 2 Matthias Schwarzott gentoo-dev 2009-11-13 19:51:21 UTC
I added the "return 0" at the end of start this is the one that should return success.
I also added it to the older init-scripts.