mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
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: Fri, 2 Jun 2017 11:46:06 +0200	[thread overview]
Message-ID: <20170602094606.v6hmsi5pdp7zw7ge@pengutronix.de> (raw)
In-Reply-To: <D415CD2EC4182C4EAB90A76B7D9F16DC022035FBDE@EX-DAG01.eckelmann.group>

Hi,

On Thu, Jun 01, 2017 at 02:51:46PM +0000, Schenk, Gavin wrote:
> before continuing to hack ptxdist and rc-once, I would appreciate some
> feedback from the gurus.
>  
> I want to use systemd.offline-updated as introduced here and already used in PTXDIST by rc-once:
> https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html#
> 
> In my use case, I have to do some data-migration stuff on an already
> delivered target. The data-migration has some deep impacts on the targets
> storages and I want to ensure no other stuff is running on the machine.
> Additionally I would like to provide my customers some gui when transforming
> the targets data. As the migration is done via shell scripts I use pv and
> dialog. To be able to use dialog a VT on the framebuffer I have to do some
> settings in the service file e.g.:
> 
> ...
> StandardOutput=tty
> StandardInput=tty
> TTYPath=/dev/tty1
> TTYReset=yes
> TTYVHangup=yes
> ...
> 
> One of my problems is, that rc-once does not check where /system-update
> points to, as suggested. My idea is to install a second update-service that
> does the migration stuff instead of hacking rc-once service file and do it
> there. Running both in parallel is a bad idea!
>  
> 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.

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

  reply	other threads:[~2017-06-02  9:46 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 [this message]
2017-06-02 11:15   ` Schenk, Gavin
2017-06-06  9:04     ` Michael Olbrich
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=20170602094606.v6hmsi5pdp7zw7ge@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