* [PATCH] debian: don't fail postinst when upgrading chroot
@ 2018-02-26 22:43 Darrick J. Wong
2018-02-26 22:55 ` Nathan Scott
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2018-02-26 22:43 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs, nathans
From: Darrick J. Wong <darrick.wong@oracle.com>
If we're upgrading a systemd-enabled chroot we'll fail because systemctl
can't connect to a running systemd (nor should it). We don't need to
issue daemon-reload inside a chroot that doesn't have a running systemd,
so we can ignore the return value.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
debian/postinst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/postinst b/debian/postinst
index 11693a6..2ad9174 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -9,7 +9,7 @@ case "${1}" in
update-initramfs -u
fi
if [ -x /bin/systemctl ]; then
- /bin/systemctl daemon-reload
+ /bin/systemctl daemon-reload 2>&1 || true
fi
;;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] debian: don't fail postinst when upgrading chroot
2018-02-26 22:43 [PATCH] debian: don't fail postinst when upgrading chroot Darrick J. Wong
@ 2018-02-26 22:55 ` Nathan Scott
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Scott @ 2018-02-26 22:55 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Eric Sandeen, xfs
On Tue, Feb 27, 2018 at 9:43 AM, Darrick J. Wong
<darrick.wong@oracle.com> wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> If we're upgrading a systemd-enabled chroot we'll fail because systemctl
> can't connect to a running systemd (nor should it). We don't need to
> issue daemon-reload inside a chroot that doesn't have a running systemd,
> so we can ignore the return value.
LGTM.
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Nathan Scott <nathans@debian.org>
cheers.
--
Nathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-26 22:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 22:43 [PATCH] debian: don't fail postinst when upgrading chroot Darrick J. Wong
2018-02-26 22:55 ` Nathan Scott
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.