All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dracut systemd cmdline service fix
@ 2013-05-16  5:15 dyoung-H+wXaHxf7aLQT0dZR+AlfA
       [not found] ` <51946b65.1SfwJA0QAkY6Gb83%dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: dyoung-H+wXaHxf7aLQT0dZR+AlfA @ 2013-05-16  5:15 UTC (permalink / raw)
  To: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, -c,
	initramfs-u79uwXL29TY76Z2rM5mHXA


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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dracut systemd cmdline service fix
       [not found] ` <51946b65.1SfwJA0QAkY6Gb83%dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-28 10:53   ` Harald Hoyer
       [not found]     ` <51A48CC2.40500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Harald Hoyer @ 2013-05-28 10:53 UTC (permalink / raw)
  To: dyoung-H+wXaHxf7aLQT0dZR+AlfA
  Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

On 05/16/2013 07:15 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dracut systemd cmdline service fix
       [not found]     ` <51A48CC2.40500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-29  2:00       ` Dave Young
       [not found]         ` <51A5614C.8090606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2013-05-30  5:07       ` Dave Young
  1 sibling, 1 reply; 8+ messages in thread
From: Dave Young @ 2013-05-29  2:00 UTC (permalink / raw)
  To: Harald Hoyer
  Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

On 05/28/2013 06:53 PM, Harald Hoyer wrote:
> On 05/16/2013 07:15 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>>  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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dracut systemd cmdline service fix
       [not found]         ` <51A5614C.8090606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-29  8:38           ` Harald Hoyer
       [not found]             ` <51A5BE95.3070303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Harald Hoyer @ 2013-05-29  8:38 UTC (permalink / raw)
  To: Dave Young
  Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

On 05/29/2013 04:00 AM, Dave Young wrote:
> On 05/28/2013 06:53 PM, Harald Hoyer wrote:
>> On 05/16/2013 07:15 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>> ---
>>>  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/cmdline
> 
> Is the above Conditions 'or' or 'and' relations?
> will it just skip cmdline service in case any of the conditions do es not match?

It is OR and it will start dracut-cmdline.service if any of the |= conditions is
matched.

> 
> 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?
> 

If anything is installed in the cmdline hook via "inst_hook cmdline" the
dracut-cmdline.service will be started because of
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dracut systemd cmdline service fix
       [not found]             ` <51A5BE95.3070303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-29  9:28               ` Dave Young
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Young @ 2013-05-29  9:28 UTC (permalink / raw)
  To: Harald Hoyer
  Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

On 05/29/2013 04:38 PM, Harald Hoyer wrote:
> On 05/29/2013 04:00 AM, Dave Young wrote:
>> On 05/28/2013 06:53 PM, Harald Hoyer wrote:
>>> On 05/16/2013 07:15 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>>> ---
>>>>  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/cmdline
>>
>> Is the above Conditions 'or' or 'and' relations?
>> will it just skip cmdline service in case any of the conditions do es not match?
> 
> It is OR and it will start dracut-cmdline.service if any of the |= conditions is
> matched.

Good to know, it's ok then..

> 
>>
>> 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?
>>
> 
> If anything is installed in the cmdline hook via "inst_hook cmdline" the
> dracut-cmdline.service will be started because of
> ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline
> 

Thanks for tell

-- 
Thanks
Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dracut systemd cmdline service fix
       [not found]     ` <51A48CC2.40500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2013-05-29  2:00       ` Dave Young
@ 2013-05-30  5:07       ` Dave Young
       [not found]         ` <51A6DEA3.4060505-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Dave Young @ 2013-05-30  5:07 UTC (permalink / raw)
  To: Harald Hoyer
  Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

On 05/28/2013 06:53 PM, Harald Hoyer wrote:
> On 05/16/2013 07:15 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>>  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

Kdump test still fails, looks like pre-pivot hooks scripts do not get
the NEWROOT value.

How about move the NEWROOT= to dracut-lib.sh, any hooks want to use
NEWROOT should source dracut-lib.sh?

-- 
Thanks
Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dracut systemd cmdline service fix
       [not found]         ` <51A6DEA3.4060505-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-30  6:52           ` Harald Hoyer
       [not found]             ` <51A6F742.5030400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Harald Hoyer @ 2013-05-30  6:52 UTC (permalink / raw)
  To: Dave Young
  Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

On 05/30/2013 07:07 AM, Dave Young wrote:
> On 05/28/2013 06:53 PM, Harald Hoyer wrote:
>> On 05/16/2013 07:15 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>> ---
>>>  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
> 
> Kdump test still fails, looks like pre-pivot hooks scripts do not get
> the NEWROOT value.
> 
> How about move the NEWROOT= to dracut-lib.sh, any hooks want to use
> NEWROOT should source dracut-lib.sh?
> 

--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -2,6 +2,9 @@
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh

+export DRACUT_SYSTEMD
+export NEWROOT

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] dracut systemd cmdline service fix
       [not found]             ` <51A6F742.5030400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-05-30  8:47               ` Dave Young
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Young @ 2013-05-30  8:47 UTC (permalink / raw)
  To: Harald Hoyer
  Cc: vgoyal-H+wXaHxf7aLQT0dZR+AlfA, bhe-H+wXaHxf7aLQT0dZR+AlfA,
	chaowang-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

On 05/30/2013 02:52 PM, Harald Hoyer wrote:
> On 05/30/2013 07:07 AM, Dave Young wrote:
>> On 05/28/2013 06:53 PM, Harald Hoyer wrote:
>>> On 05/16/2013 07:15 AM, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>>> ---
>>>>  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
>>
>> Kdump test still fails, looks like pre-pivot hooks scripts do not get
>> the NEWROOT value.
>>
>> How about move the NEWROOT= to dracut-lib.sh, any hooks want to use
>> NEWROOT should source dracut-lib.sh?
>>
> 
> --- a/modules.d/99base/dracut-lib.sh
> +++ b/modules.d/99base/dracut-lib.sh
> @@ -2,6 +2,9 @@
>  # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
>  # ex: ts=8 sw=4 sts=4 et filetype=sh
> 
> +export DRACUT_SYSTEMD
> +export NEWROOT

It works for me, thanks.

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


-- 
Thanks
Dave


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-30  8:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16  5:15 [PATCH] dracut systemd cmdline service fix dyoung-H+wXaHxf7aLQT0dZR+AlfA
     [not found] ` <51946b65.1SfwJA0QAkY6Gb83%dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-28 10:53   ` Harald Hoyer
     [not found]     ` <51A48CC2.40500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  2:00       ` Dave Young
     [not found]         ` <51A5614C.8090606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  8:38           ` Harald Hoyer
     [not found]             ` <51A5BE95.3070303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-29  9:28               ` Dave Young
2013-05-30  5:07       ` Dave Young
     [not found]         ` <51A6DEA3.4060505-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30  6:52           ` Harald Hoyer
     [not found]             ` <51A6F742.5030400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30  8:47               ` Dave Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.