From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] systemd: Using second offline update service beside rc-once in PTXDIST
Date: Tue, 6 Jun 2017 11:04:56 +0200 [thread overview]
Message-ID: <20170606090456.oa4egsreaiorwffn@pengutronix.de> (raw)
In-Reply-To: <D415CD2EC4182C4EAB90A76B7D9F16DC022035FD2E@EX-DAG01.eckelmann.group>
Hi,
On Fri, Jun 02, 2017 at 11:15:37AM +0000, Schenk, Gavin wrote:
> > > What do you think about using readlink in systemd-rc-once and just
> > > exit without error if /system-update does point to another location
> > > than /etc/rc-once?
> > > Another idea is to add a second service that doesn´t check
> > > /system-update either and use a after directive in its service file?
> > > Is this something we want a common solution for?
> >
> > I think checking the link target for /system-update is a good solution.
> > This will keep things separated. But make sure the check is correct:
> > Currently /usr/sbin/enable-rc-once uses 'etc/rc.once.d' as link target
> > and /usr/lib/systemd/systemd-rc-once uses '/etc/rc.once.d' (in the
> > fallback case). I think that should be fixed, but both versions should
> > be accepted by systemd-rc-once.
> >
>
> Thank you for the fast feedback, I will send a patch.
>
> Some Questions:
> Using readlink is ok? (additional dependency rc-once -> readlink )
> Is there anything more lightweight?
Not that I know. Note: if you use 'readlink -f' then the busybox version
has a option for this, so maybe:
select BUSYBOX_FEATURE_READLINK_FOLLOW if BUSYBOX_READLINK
select COREUTILS if !BUSYBOX_READLINK
select COREUTILS_READLINK if !BUSYBOX_READLINK
> Do we need this stuff configurable?
No. But I think we should have a sanity check. To avoid getting stuck in
the system-update.target: A service that is part of system-update.target
and starts the rescue target. rc-once.service and your service should both
be sorted 'Before' that service. If no other service starts a different
target we automatically fall into the rescue target.
Regards,
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2017-06-06 9:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 14:51 Schenk, Gavin
2017-06-02 9:46 ` Michael Olbrich
2017-06-02 11:15 ` Schenk, Gavin
2017-06-06 9:04 ` Michael Olbrich [this message]
2017-06-06 15:28 ` Schenk, Gavin
2017-06-06 16:33 ` Michael Olbrich
2017-06-07 7:26 ` Schenk, Gavin
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=20170606090456.oa4egsreaiorwffn@pengutronix.de \
--to=m.olbrich@pengutronix.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