Re: [PATCH] dracut systemd cmdline service fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/28/2013 06:53 PM, Harald Hoyer wrote:
> On 05/16/2013 07:15 AM, dyoung@xxxxxxxxxx wrote:
>>
>> Kdump test failed since below commits 
>> dbfaae0e34507d2d1f3c186ffe26af3e8028b9f8
>>
>> Fedora bug is here:
>> https://bugzilla.redhat.com/show_bug.cgi?id=963159
>>
>> The reason is the hooks afterwards need NEWROOT env which
>> is set in dracut-cmdline.sh.
>>
>> In this case there's no files under /etc/cmdline.d/ and
>> /lib/dracut/hooks/cmdline/. Conditions checking failed, so
>> the cmdline service failed to startup.
>>
>> Fix this issue by remove the Conditions thus cmdline service
>> always run if /etc/initrd-release exists.
>>
>> Signed-off-by: Dave Young <dyoung@xxxxxxxxxx>
>> ---
>>  modules.d/98systemd/dracut-cmdline.service |    5 -----
>>  1 file changed, 5 deletions(-)
>>
>> --- dracut.orig/modules.d/98systemd/dracut-cmdline.service
>> +++ dracut/modules.d/98systemd/dracut-cmdline.service
>> @@ -16,11 +16,6 @@ Before=systemd-vconsole-setup.service
>>  After=systemd-journald.socket
>>  Wants=systemd-journald.socket
>>  ConditionPathExists=/etc/initrd-release
>> -ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
>> -ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
>> -ConditionKernelCommandLine=|rd.break=cmdline
>> -ConditionKernelCommandLine=|resume
>> -ConditionKernelCommandLine=|noresume
>>  
>>  [Service]
>>  Type=oneshot
> 
> Will be fixed by setting
> 
> Environment=DRACUT_SYSTEMD=1
> Environment=NEWROOT=/sysroot
> 
> in the service files.
> 
Hi, Harald

Thanks for your fix, but I'm still worrying about below code:
-ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
-ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdlin

Is the above Conditions 'or' or 'and' relations?
will it just skip cmdline service in case any of the conditions do es not match?

If above is true then I'm still worrying about we will cause more problems. grep "inst_hook cmdline" shows a lot of stuff which is not limited to parsing /etc/cmdline.d/*.conf, such as:
04watchdog/module-setup.sh:    inst_hook cmdline   50 "$moddir/watchdog.sh"
40network/module-setup.sh:    inst_hook cmdline 91 "$moddir/dhcp-root.sh"
96securityfs/module-setup.sh:    inst_hook cmdline 60 "$moddir/securityfs.sh"

Even for hooks parsing cmdline, the cmdline params are not limited to /etc/cmdline.d/*.conf, they can also be specified in grub cmdline, isn't it?

-- 
Thanks
Dave


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux