From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Gerhard Wiesinger <lists-tcxHB8FAk+J54TAoqtyWWQ@public.gmane.org>,
initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] write-ifcfg.sh: Don't overwrite network config in root filesystem
Date: Wed, 25 Jun 2014 11:51:10 +0200 [thread overview]
Message-ID: <53AA9B8E.7020801@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1406211239250.1876-GinJ0NHkz1PSbTvUbH3RCA@public.gmane.org>
On 21.06.2014 12:40, Gerhard Wiesinger wrote:
> This patch adds the possibility to keep the original
> network configuration specified in the root filesystem.
> This is necessary in situations with dual stack IPv4 and
> IPv6 configurations or different kind on nameservers
> (e.g. public ones at boot time, running a dns server
> on localhost later on).
>
> Keeping original configuration can be activated by:
> networkstatic=yes
> on the kernel boot command line.
>
> Signed-off-by: Gerhard Wiesinger <lists-tcxHB8FAk+J54TAoqtyWWQ@public.gmane.org>
> ---
> modules.d/45ifcfg/write-ifcfg.sh | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
> index 803ae8e..033abe5 100755
> --- a/modules.d/45ifcfg/write-ifcfg.sh
> +++ b/modules.d/45ifcfg/write-ifcfg.sh
> @@ -277,7 +277,10 @@ echo "files /etc/sysconfig/network-scripts" >>
> /run/initramfs/rwtab
> echo "files /var/lib/dhclient" >> /run/initramfs/rwtab
> {
> cp /tmp/net.* /run/initramfs/
> - cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf
> - copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts
> + networkstatic="$(getarg networkstatic=)"
> + if [ -z "${networkstatic}" ]; then
> + cp /tmp/net.$netif.resolv.conf /run/initramfs/state/etc/resolv.conf
> + copytree /tmp/ifcfg /run/initramfs/state/etc/sysconfig/network-scripts
> + fi
> cp /tmp/ifcfg-leases/* /run/initramfs/state/var/lib/dhclient
> } > /dev/null 2>&1
I don't understand this. It only copies to /run/initramfs. If you want to keep
your original network configuration, just don't copy over the files from
/run/initramfs to your root filesystem.
next prev parent reply other threads:[~2014-06-25 9:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-21 10:40 [PATCH] write-ifcfg.sh: Don't overwrite network config in root filesystem Gerhard Wiesinger
[not found] ` <alpine.LFD.2.02.1406211239250.1876-GinJ0NHkz1PSbTvUbH3RCA@public.gmane.org>
2014-06-25 9:51 ` Harald Hoyer [this message]
[not found] ` <53AA9B8E.7020801-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-25 11:07 ` Gerhard Wiesinger
[not found] ` <53AAAD6E.9010207-tcxHB8FAk+J54TAoqtyWWQ@public.gmane.org>
2014-06-25 12:45 ` Harald Hoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53AA9B8E.7020801@redhat.com \
--to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lists-tcxHB8FAk+J54TAoqtyWWQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox