[systemd-devel] udevd and "quiet"
Colin Guthrie
gmane at colin.guthr.ie
Mon Nov 10 03:01:41 PST 2014
Sorry for the "speaking to myself" spam.
Colin Guthrie wrote on 10/11/14 10:29:
> Colin Guthrie wrote on 10/11/14 10:11:
>> Hi,
>>
>> Not sure how long this has been the case, but in a dracut initrd that is
>> NOT using systemd, udevd will print out "starting version 217" even when
>> "quiet" is used on the command line.
>>
>> This isn't ideal as it should be mostly silent when quiet is used and
>> indeed this is the only output from the initrd.
>>
>> So question is, what is the correct fix.
>>
>> I don't really like the idea of udevd parsing "quiet" directly as this
>> should really only apply to pid1.
>>
>> So perhaps dracut (as PID1 at that stage) should parse the "quiet"
>> command line and set SYSTEMD_LOG_LEVEL=warning (or err?) before starting
>> udevd (it doesn't seem that udevd takes any --log-level= (and friends)
>> arguments, so the environment seems the only way).
>>
>> Is this the right approach or am I maybe missing something?
>
> Hmm, this won't work it seems anyway, as right after
> log_parse_enviornment() and log_open() there is a call to:
>
>
> log_set_max_level(udev_get_log_priority(udev));
>
> So it seems that an evnironment parsing is very swiftly overridden -
> which makes env parsing kinda pointless IMO.
>
> Any thoughts?
>
> CC'ing Tom as he changed the default log level to INFO recently in
> 2004d23a0fcaa6e74631057a2ff75594a038d86e which is likely why I'm seeing
> the bubble up now...
"recently" fail... I misread the year! :D
So looking at this further, it seems that dracut has kernel command line
options to tweak the log level of dracut via udevadm control. The fact
that it has an option to tweak it *to* info suggest that dracut assumes
it's something else, and I'd guess it assumes err.
So I think the correct behaviour here is to just set UDEV_LOG=err
unconditionally in dracut and let the udevadm control options kick in later.
Either that or a slight tweak to avoid the udevadm control altogether,
and just set UDEV_LOG correctly from the beginning but not sure how well
that works with older udev versions and whether or not UDEV_LOG env var
works with older udevs that are still supported?
Anyway, I guess this is one to follow up with Harald on the initramfs ML.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited http://www.tribalogic.net/
Open Source:
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/
More information about the systemd-devel
mailing list