* [PATCH cleanups] livenet: simplify writing net.ifaces
@ 2012-09-25 16:10 Will Woods
[not found] ` <1348589458-13212-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Will Woods @ 2012-09-25 16:10 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
commit db2b12f removed the rd.neednet argument and uses /tmp/net.ifaces
instead. This means we don't need to mess with CMDLINE.
---
modules.d/90livenet/parse-livenet.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh
index 365eca1..0e61870 100755
--- a/modules.d/90livenet/parse-livenet.sh
+++ b/modules.d/90livenet/parse-livenet.sh
@@ -9,10 +9,7 @@
updates=$(getarg live.updates=)
if [ -n "$updates" ]; then
# make sure network comes up even if we're doing a local live device
- if [ -z "$netroot" ]; then
- echo > /tmp/net.ifaces
- unset CMDLINE
- fi
+ [ -z "$netroot" ] && >> /tmp/net.ifaces
echo "$updates" > /tmp/liveupdates.info
echo '[ -e /tmp/liveupdates.done ]' > \
$hookdir/initqueue/finished/liveupdates.sh
--
1.7.11.4
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1348589458-13212-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH cleanups] livenet: simplify writing net.ifaces [not found] ` <1348589458-13212-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-09-26 9:52 ` Harald Hoyer [not found] ` <5062D05C.40301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Harald Hoyer @ 2012-09-26 9:52 UTC (permalink / raw) To: Will Woods; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA Am 25.09.2012 18:10, schrieb Will Woods: > commit db2b12f removed the rd.neednet argument and uses /tmp/net.ifaces > instead. This means we don't need to mess with CMDLINE. > --- > modules.d/90livenet/parse-livenet.sh | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh > index 365eca1..0e61870 100755 > --- a/modules.d/90livenet/parse-livenet.sh > +++ b/modules.d/90livenet/parse-livenet.sh > @@ -9,10 +9,7 @@ > updates=$(getarg live.updates=) > if [ -n "$updates" ]; then > # make sure network comes up even if we're doing a local live device > - if [ -z "$netroot" ]; then > - echo > /tmp/net.ifaces > - unset CMDLINE > - fi > + [ -z "$netroot" ] && >> /tmp/net.ifaces > echo "$updates" > /tmp/liveupdates.info > echo '[ -e /tmp/liveupdates.done ]' > \ > $hookdir/initqueue/finished/liveupdates.sh > but commit 48dba7f9ace186871528eb4d83cd96e92e853c6c added it again :) ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <5062D05C.40301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH cleanups] livenet: simplify writing net.ifaces [not found] ` <5062D05C.40301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2012-09-26 15:52 ` Will Woods 0 siblings, 0 replies; 3+ messages in thread From: Will Woods @ 2012-09-26 15:52 UTC (permalink / raw) To: Harald Hoyer; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA On Wed, 2012-09-26 at 11:52 +0200, Harald Hoyer wrote: > Am 25.09.2012 18:10, schrieb Will Woods: > > commit db2b12f removed the rd.neednet argument and uses /tmp/net.ifaces > > instead. This means we don't need to mess with CMDLINE. > > --- > > modules.d/90livenet/parse-livenet.sh | 5 +---- > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh > > index 365eca1..0e61870 100755 > > --- a/modules.d/90livenet/parse-livenet.sh > > +++ b/modules.d/90livenet/parse-livenet.sh > > @@ -9,10 +9,7 @@ > > updates=$(getarg live.updates=) > > if [ -n "$updates" ]; then > > # make sure network comes up even if we're doing a local live device > > - if [ -z "$netroot" ]; then > > - echo > /tmp/net.ifaces > > - unset CMDLINE > > - fi > > + [ -z "$netroot" ] && >> /tmp/net.ifaces > > echo "$updates" > /tmp/liveupdates.info > > echo '[ -e /tmp/liveupdates.done ]' > \ > > $hookdir/initqueue/finished/liveupdates.sh > > > > but commit 48dba7f9ace186871528eb4d83cd96e92e853c6c added it again :) True! But the way network is currently handled, having either /tmp/net.ifaces *or* rd.neednet will make the network come up. So it's still sufficient to just create /tmp/net.ifaces, and we still don't need to mess with CMDLINE. It's also kind of silly - the only reason the 'unset CMDLINE' is there is because before commit db2b12f, those two lines were: echo "rd.neednet=1" > /etc/cmdline.d/90livenet.conf unset CMDLINE The second line is only there to "activate" the 'rd.neednet' argument. Commit db2b12f changed the first line to 'echo > /tmp/net.ifaces', which is sufficient by itself - the second line is no longer necessary. So really this patch is equivalent to dropping the useless 'unset CMDLINE', plus some other cleanups[1]. [1] I have a pet peeve about "echo > $file". It's not as bad as "cat $file | grep", but it's still unnecessary. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-26 15:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 16:10 [PATCH cleanups] livenet: simplify writing net.ifaces Will Woods
[not found] ` <1348589458-13212-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-09-26 9:52 ` Harald Hoyer
[not found] ` <5062D05C.40301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-09-26 15:52 ` Will Woods
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.