From: "Artur Wiebe" <artur@4wiebe.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] ?==?utf-8?q? ?==?utf-8?q? [PATCH] machine-id: make using rc-once optional
Date: Fri, 04 Dec 2020 10:33:32 +0100 [thread overview]
Message-ID: <2bebd7-5fca0280-15-dbde080@255940189> (raw)
In-Reply-To: <20201204063256.GA3717075@pengutronix.de>
Hi Michael,
sorry, I misunderstood some parts of your review on the first reading.
I think the new patch does what you suggested.
Artur
On Friday, December 04, 2020 07:32 CET, Michael Olbrich <m.olbrich@pengutronix.de> wrote:
> On Mon, Nov 30, 2020 at 11:42:54AM +0100, Artur Wiebe wrote:
> > If not set only an empty /etc/machine-id will be installed.
>
> I'm ok with keeping the prompt for MACHINE_ID_RC_ONCE, but you have ignored
> all my other review as well. That still needs to be fixed.
>
> Michael
>
> >
> > Signed-off-by: Artur Wiebe <artur@4wiebe.de>
> > ---
> > projectroot/etc/machine-id | 0
> > rules/machine-id.in | 22 ++++++++++++++++++----
> > rules/machine-id.make | 4 ++++
> > rules/machine-id.postinst | 5 +++--
> > 4 files changed, 25 insertions(+), 6 deletions(-)
> > create mode 100644 projectroot/etc/machine-id
> >
> > diff --git a/projectroot/etc/machine-id b/projectroot/etc/machine-id
> > new file mode 100644
> > index 000000000..e69de29bb
> > diff --git a/rules/machine-id.in b/rules/machine-id.in
> > index f18fec554..2a3901f41 100644
> > --- a/rules/machine-id.in
> > +++ b/rules/machine-id.in
> > @@ -1,11 +1,25 @@
> > ## SECTION=initmethod
> >
> > -config MACHINE_ID
> > +menuconfig MACHINE_ID
> > tristate
> > prompt "create /etc/machine-id"
> > - select RC_ONCE if RUNTIME
> > - select UTIL_LINUX_NG if !INITMETHOD_SYSTEMD
> > - select UTIL_LINUX_NG_UUIDGEN if !INITMETHOD_SYSTEMD
> > + select RC_ONCE if MACHINE_ID_RC_ONCE && RUNTIME
> > + select UTIL_LINUX_NG if MACHINE_ID_RC_ONCE && !INITMETHOD_SYSTEMD
> > + select UTIL_LINUX_NG_UUIDGEN if MACHINE_ID_RC_ONCE && !INITMETHOD_SYSTEMD
> > help
> > Enable this to make sure there is always a unique /etc/machine-id
> > available in the system.
> > +
> > +if MACHINE_ID
> > +
> > +config MACHINE_ID_RC_ONCE
> > + bool "generate (bbinit) or save (systemd) machine-id using rc-once at first boot"
> > + default y
> > + help
> > + If not set only an empty /etc/machine-id will be installed.
> > + Systemd:
> > + If /etc/machine-id exists and is empty, systemd will bind-mount
> > + a file containing the new machine-id over it and later try
> > + to commit it to disk (if /etc/ is writable).
> > +
> > +endif
> > diff --git a/rules/machine-id.make b/rules/machine-id.make
> > index 3883d64cb..5d66829da 100644
> > --- a/rules/machine-id.make
> > +++ b/rules/machine-id.make
> > @@ -27,7 +27,11 @@ $(STATEDIR)/machine-id.targetinstall:
> > @$(call install_fixup,machine-id,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
> > @$(call install_fixup,machine-id,DESCRIPTION,missing)
> >
> > + @$(call install_alternative, machine-id, 0, 0, 0444, /etc/machine-id)
> > +
> > +ifdef MACHINE_ID_RC_ONCE
> > @$(call install_alternative, machine-id, 0, 0, 0755, /etc/rc.once.d/machine-id)
> > +endif
> >
> > @$(call install_finish,machine-id)
> >
> > diff --git a/rules/machine-id.postinst b/rules/machine-id.postinst
> > index 2060129d1..f1648226b 100644
> > --- a/rules/machine-id.postinst
> > +++ b/rules/machine-id.postinst
> > @@ -1,3 +1,4 @@
> > #!/bin/sh
> > -touch "$DESTDIR/etc/machine-id"
> > -$DESTDIR/usr/sbin/enable-rc-once machine-id
> > +if [ -f $DESTDIR/etc/rc.once.d/machine-id ]; then
> > + $DESTDIR/usr/sbin/enable-rc-once machine-id
> > +fi
> > --
> > 2.29.2
> >
> >
> > _______________________________________________
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> >
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
next prev parent reply other threads:[~2020-12-04 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 10:42 [ptxdist] " Artur Wiebe
2020-12-04 6:32 ` Michael Olbrich
2020-12-04 9:33 ` Artur Wiebe [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-11-27 8:38 Michael Olbrich
2020-11-27 9:52 ` [ptxdist] ?==?utf-8?q? ?==?utf-8?q? " Artur Wiebe
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=2bebd7-5fca0280-15-dbde080@255940189 \
--to=artur@4wiebe.de \
--cc=ptxdist@pengutronix.de \
/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