[arch-general] [PATCH 1/1] systemd: restart services after update
Leonid Isaev
lisaev at umail.iu.edu
Wed Jun 11 12:13:11 EDT 2014
Hi,
On Wed, Jun 11, 2014 at 12:15:18PM +0200, Christian Hesse wrote:
> Date: Wed, 11 Jun 2014 12:15:18 +0200
> From: Christian Hesse <list at eworm.de>
> To: arch-general <arch-general at archlinux.org>
> Cc: Christian Hesse <mail at eworm.de>
> Subject: [arch-general] [PATCH 1/1] systemd: restart services after update
> X-Mailer: git-send-email 2.0.0
>
> From: Christian Hesse <mail at eworm.de>
>
> ---
> systemd.install | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/systemd.install b/systemd.install
> index 5c370f7..11e97bc 100644
> --- a/systemd.install
> +++ b/systemd.install
> @@ -27,6 +27,12 @@ maybe_reexec() {
>
> if sd_booted; then
> systemctl --system daemon-reexec
> +
> + for SERVICE in systemd-journald systemd-logind systemd-machined systemd-networkd systemd-resolved systemd-udevd; do
> + if systemctl is-active ${SERVICE} >/dev/null; then
> + systemctl restart ${SERVICE}
> + fi
> + done
> fi
> }
Are you sure it's a good idea to restart things like that? Because this assumes
that these daemons are independent -- is this a valid assumption? It seems that
systemctl daemon-reexec _should_ reexec itself and its flock of helpers...
Thanks,
--
Leonid Isaev
GPG fingerprints: DA92 034D B4A8 EC51 7EA6 20DF 9291 EE8A 043C B8C4
C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20140611/cdfb76d1/attachment.asc>
More information about the arch-general
mailing list