All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] interpret 'off' as false in getargbool
@ 2012-01-11 17:48 Will Woods
       [not found] ` <1326304109-32652-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Will Woods @ 2012-01-11 17:48 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA


Signed-off-by: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 modules.d/99base/dracut-lib.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index e86d209..ca3bc0e 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -124,6 +124,7 @@ getargbool() {
     if [ -n "$_b" ]; then
         [ $_b = "0" ] && return 1
         [ $_b = "no" ] && return 1
+        [ $_b = "off" ] && return 1
     fi
     return 0
 }
-- 
1.7.7.5

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

* [PATCH 2/3] minor cleanups in parsing for dmsquash-live and livenet
       [not found] ` <1326304109-32652-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-01-11 17:48   ` Will Woods
       [not found]     ` <1326304109-32652-2-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2012-01-11 17:48   ` [PATCH 3/3] allow network setup without netroot Will Woods
  2012-01-13 10:51   ` [PATCH 1/3] interpret 'off' as false in getargbool Harald Hoyer
  2 siblings, 1 reply; 9+ messages in thread
From: Will Woods @ 2012-01-11 17:48 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

- use wait_for_dev in livenet
- clarify log message and fix missing newline in dmsquash-live

Signed-off-by: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 modules.d/90dmsquash-live/parse-dmsquash-live.sh |    4 ++--
 modules.d/90livenet/parse-livenet.sh             |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
index a733144..d60db01 100755
--- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh
+++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh
@@ -41,9 +41,9 @@ case "$liveroot" in
     live:/*.[Ii][Mm][Gg]|/*.[Ii][Mm][Gg])
         [ -f "${root#live:}" ] && rootok=1 ;;
 esac
-info "liveroot was $liveroot, is now $root"
+info "root was $liveroot, is now $root"
 
 # make sure that init doesn't complain
 [ -z "$root" ] && root="live"
 
-wait_for_dev /dev/mapper/live-rw
\ No newline at end of file
+wait_for_dev /dev/mapper/live-rw
diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh
index 323fd4a..2e6bc4b 100755
--- a/modules.d/90livenet/parse-livenet.sh
+++ b/modules.d/90livenet/parse-livenet.sh
@@ -16,4 +16,4 @@ case "$liveurl" in
         rootok=1 ;;
 esac
 
-echo '[ -e /dev/root ]' > $hookdir/initqueue/finished/livenet.sh
+wait_for_dev /dev/root
-- 
1.7.7.5

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

* [PATCH 3/3] allow network setup without netroot
       [not found] ` <1326304109-32652-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2012-01-11 17:48   ` [PATCH 2/3] minor cleanups in parsing for dmsquash-live and livenet Will Woods
@ 2012-01-11 17:48   ` Will Woods
       [not found]     ` <1326304109-32652-3-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2012-01-13 10:51   ` [PATCH 1/3] interpret 'off' as false in getargbool Harald Hoyer
  2 siblings, 1 reply; 9+ messages in thread
From: Will Woods @ 2012-01-11 17:48 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Currently, network configuration arguments are ignored *unless* the root
device is a network device. But there are some cases where you might
want to set up the network even though you have a non-network root
device (e.g. to fetch updates from the network for a livecd image).

With this patch you can set "netroot=no", which will cause dracut to set
up the network according to your other boot arguments but not attempt to
set up a network root device.

Signed-off-by: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 modules.d/40network/netroot |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
index 9d996cc..eba269a 100755
--- a/modules.d/40network/netroot
+++ b/modules.d/40network/netroot
@@ -13,11 +13,12 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
 [ ! -e /tmp/net.$1.up ] && exit 1
 
 # There's no sense in doing something if no (net)root info is available
-# or root is already there
+# or root is already there - or if we're specifially told not to
 [ -e /tmp/root.info ] || exit 1
 . /tmp/root.info
 [ -d $NEWROOT/proc ] && exit 0
 [ -z "$netroot" ] && exit 1
+[ "$netroot" = "no" ] && exit 0
 
 # Let's see if we have to wait for other interfaces
 # Note: exit works just fine, since the last interface to be
-- 
1.7.7.5

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

* Re: [PATCH 3/3] allow network setup without netroot
       [not found]     ` <1326304109-32652-3-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-01-11 21:06       ` Will Woods
       [not found]         ` <20120111210614.GB14024-s6BhOCdKmxS3M6m420IelR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Will Woods @ 2012-01-11 21:06 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

On Wed, Jan 11, 2012 at 12:48:29PM -0500, Will Woods wrote:
> Currently, network configuration arguments are ignored *unless* the root
> device is a network device. But there are some cases where you might
> want to set up the network even though you have a non-network root
> device (e.g. to fetch updates from the network for a livecd image).
> 
> With this patch you can set "netroot=no", which will cause dracut to set
> up the network according to your other boot arguments but not attempt to
> set up a network root device.
> 
> Signed-off-by: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  modules.d/40network/netroot |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
> index 9d996cc..eba269a 100755
> --- a/modules.d/40network/netroot
> +++ b/modules.d/40network/netroot
> @@ -13,11 +13,12 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
>  [ ! -e /tmp/net.$1.up ] && exit 1
>  
>  # There's no sense in doing something if no (net)root info is available
> -# or root is already there
> +# or root is already there - or if we're specifially told not to
>  [ -e /tmp/root.info ] || exit 1
>  . /tmp/root.info
>  [ -d $NEWROOT/proc ] && exit 0
>  [ -z "$netroot" ] && exit 1
> +[ "$netroot" = "no" ] && exit 0

..on second thought, this might not be the best way to handle this use
case. There's a bunch of other network setup stuff that happens
afterward in 'netroot', and we probably will want that for whatever
network stuff is happening instead of mounting root.

Maybe a 'dummyroot' netroot "handler" that doesn't do anything would be
better - that way anything that wants to trigger when the network is up
can just add items to the 'netroot' hook, and they'll run like normal
netroot hooks.

If anyone's got opinions on the matter, let me know - otherwise I'll
probably have a different version of this patch in a day or two. Skip it
for now.

-w

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

* Re: [PATCH 3/3] allow network setup without netroot
       [not found]         ` <20120111210614.GB14024-s6BhOCdKmxS3M6m420IelR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
@ 2012-01-12  1:51           ` Dave Young
       [not found]             ` <4F0E3CB1.3080607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Dave Young @ 2012-01-12  1:51 UTC (permalink / raw)
  To: Will Woods; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 01/12/2012 05:06 AM, Will Woods wrote:

> On Wed, Jan 11, 2012 at 12:48:29PM -0500, Will Woods wrote:
>> Currently, network configuration arguments are ignored *unless* the root
>> device is a network device. But there are some cases where you might
>> want to set up the network even though you have a non-network root
>> device (e.g. to fetch updates from the network for a livecd image).
>>
>> With this patch you can set "netroot=no", which will cause dracut to set
>> up the network according to your other boot arguments but not attempt to
>> set up a network root device.
>>
>> Signed-off-by: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>>  modules.d/40network/netroot |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/modules.d/40network/netroot b/modules.d/40network/netroot
>> index 9d996cc..eba269a 100755
>> --- a/modules.d/40network/netroot
>> +++ b/modules.d/40network/netroot
>> @@ -13,11 +13,12 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
>>  [ ! -e /tmp/net.$1.up ] && exit 1
>>  
>>  # There's no sense in doing something if no (net)root info is available
>> -# or root is already there
>> +# or root is already there - or if we're specifially told not to
>>  [ -e /tmp/root.info ] || exit 1
>>  . /tmp/root.info
>>  [ -d $NEWROOT/proc ] && exit 0
>>  [ -z "$netroot" ] && exit 1
>> +[ "$netroot" = "no" ] && exit 0
> 
> ..on second thought, this might not be the best way to handle this use
> case. There's a bunch of other network setup stuff that happens
> afterward in 'netroot', and we probably will want that for whatever
> network stuff is happening instead of mounting root.

> 
> Maybe a 'dummyroot' netroot "handler" that doesn't do anything would be
> better - that way anything that wants to trigger when the network is up
> can just add items to the 'netroot' hook, and they'll run like normal
> netroot hooks.
> 
> If anyone's got opinions on the matter, let me know - otherwise I'll
> probably have a different version of this patch in a day or two. Skip it
> for now.


I have sent a patch for manually ifup nic, which deal with this problem
 and also be useful when we use initrd as minimal recovery system.

see:
http://www.spinics.net/lists/linux-initramfs/msg02205.html

Yes, dummy netroot is a reasonable idea for automatically bring up
network, but I still do not want to lose the manual setup option.
I'd like to have both :)

> 
> -w
> --
> 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] 9+ messages in thread

* Re: [PATCH 3/3] allow network setup without netroot
       [not found]             ` <4F0E3CB1.3080607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-01-12 17:06               ` Will Woods
       [not found]                 ` <20120112170611.GA26875-s6BhOCdKmxS3M6m420IelR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Will Woods @ 2012-01-12 17:06 UTC (permalink / raw)
  To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On Thu, Jan 12, 2012 at 09:51:45AM +0800, Dave Young wrote:
> > Maybe a 'dummyroot' netroot "handler" that doesn't do anything would be
> > better - that way anything that wants to trigger when the network is up
> > can just add items to the 'netroot' hook, and they'll run like normal
> > netroot hooks.
[...]
> Yes, dummy netroot is a reasonable idea for automatically bring up
> network, but I still do not want to lose the manual setup option.
> I'd like to have both :)

Right - they're different problems with different solutions.

I'm looking into automatic network setup for non-netroot systems because
I'm trying to replicate a lot of the stuff that anaconda (the RH/Fedora
installer) used to do in its own custom initramfs system - like fetching
updates, driver disks, and the runtime root filesystem image from the
network.

Fetching the runtime image is already done - see modules.d/90livenet.

I've got nearly-finished code for the "rd.live.updates" argument,
which would let us push out (or test) bugfixes for LiveCDs after
they've been burned/released. (Which would be nice!)

Driver disks I'm still working on, but that'll be coming soon too.

Anyway, that stuff is all pretty separate from what it sounds like you're
working on - so I think there's definitely room for both. No worries.

-w

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

* Re: [PATCH 3/3] allow network setup without netroot
       [not found]                 ` <20120112170611.GA26875-s6BhOCdKmxS3M6m420IelR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
@ 2012-01-13  2:04                   ` Dave Young
  0 siblings, 0 replies; 9+ messages in thread
From: Dave Young @ 2012-01-13  2:04 UTC (permalink / raw)
  To: Will Woods; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

Hi,

Thanks for explanation.

On 01/13/2012 01:06 AM, Will Woods wrote:

> On Thu, Jan 12, 2012 at 09:51:45AM +0800, Dave Young wrote:
>>> Maybe a 'dummyroot' netroot "handler" that doesn't do anything would be
>>> better - that way anything that wants to trigger when the network is up
>>> can just add items to the 'netroot' hook, and they'll run like normal
>>> netroot hooks.
> [...]
>> Yes, dummy netroot is a reasonable idea for automatically bring up
>> network, but I still do not want to lose the manual setup option.
>> I'd like to have both :)
> 
> Right - they're different problems with different solutions.

>

> I'm looking into automatic network setup for non-netroot systems because
> I'm trying to replicate a lot of the stuff that anaconda (the RH/Fedora
> installer) used to do in its own custom initramfs system - like fetching
> updates, driver disks, and the runtime root filesystem image from the
> network.


For kdump automatic network setup for non-netroot systems is also a good
solution, I'd like to see the feature doesn't depend on "livenet"

> 
> Fetching the runtime image is already done - see modules.d/90livenet.
> 
> I've got nearly-finished code for the "rd.live.updates" argument,
> which would let us push out (or test) bugfixes for LiveCDs after
> they've been burned/released. (Which would be nice!)
> 
> Driver disks I'm still working on, but that'll be coming soon too.
> 
> Anyway, that stuff is all pretty separate from what it sounds like you're
> working on - so I think there's definitely room for both. No worries.
> 
> -w
> --
> 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] 9+ messages in thread

* Re: [PATCH 2/3] minor cleanups in parsing for dmsquash-live and livenet
       [not found]     ` <1326304109-32652-2-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-01-13 10:51       ` Harald Hoyer
  0 siblings, 0 replies; 9+ messages in thread
From: Harald Hoyer @ 2012-01-13 10:51 UTC (permalink / raw)
  To: Will Woods; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 11.01.2012 18:48, Will Woods wrote:
> - use wait_for_dev in livenet
> - clarify log message and fix missing newline in dmsquash-live
> 
> Signed-off-by: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  modules.d/90dmsquash-live/parse-dmsquash-live.sh |    4 ++--
>  modules.d/90livenet/parse-livenet.sh             |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

applied

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

* Re: [PATCH 1/3] interpret 'off' as false in getargbool
       [not found] ` <1326304109-32652-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2012-01-11 17:48   ` [PATCH 2/3] minor cleanups in parsing for dmsquash-live and livenet Will Woods
  2012-01-11 17:48   ` [PATCH 3/3] allow network setup without netroot Will Woods
@ 2012-01-13 10:51   ` Harald Hoyer
  2 siblings, 0 replies; 9+ messages in thread
From: Harald Hoyer @ 2012-01-13 10:51 UTC (permalink / raw)
  To: Will Woods; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

On 11.01.2012 18:48, Will Woods wrote:
> Signed-off-by: Will Woods <wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  modules.d/99base/dracut-lib.sh |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
> index e86d209..ca3bc0e 100755
> --- a/modules.d/99base/dracut-lib.sh
> +++ b/modules.d/99base/dracut-lib.sh
> @@ -124,6 +124,7 @@ getargbool() {
>      if [ -n "$_b" ]; then
>          [ $_b = "0" ] && return 1
>          [ $_b = "no" ] && return 1
> +        [ $_b = "off" ] && return 1
>      fi
>      return 0
>  }

applied

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

end of thread, other threads:[~2012-01-13 10:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 17:48 [PATCH 1/3] interpret 'off' as false in getargbool Will Woods
     [not found] ` <1326304109-32652-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-01-11 17:48   ` [PATCH 2/3] minor cleanups in parsing for dmsquash-live and livenet Will Woods
     [not found]     ` <1326304109-32652-2-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-01-13 10:51       ` Harald Hoyer
2012-01-11 17:48   ` [PATCH 3/3] allow network setup without netroot Will Woods
     [not found]     ` <1326304109-32652-3-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-01-11 21:06       ` Will Woods
     [not found]         ` <20120111210614.GB14024-s6BhOCdKmxS3M6m420IelR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2012-01-12  1:51           ` Dave Young
     [not found]             ` <4F0E3CB1.3080607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-01-12 17:06               ` Will Woods
     [not found]                 ` <20120112170611.GA26875-s6BhOCdKmxS3M6m420IelR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2012-01-13  2:04                   ` Dave Young
2012-01-13 10:51   ` [PATCH 1/3] interpret 'off' as false in getargbool Harald Hoyer

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.