]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
debian: don't fail postinst when upgrading chroot
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 27 Feb 2018 01:43:58 +0000 (19:43 -0600)
committerEric Sandeen <sandeen@redhat.com>
Tue, 27 Feb 2018 01:43:58 +0000 (19:43 -0600)
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>
Reviewed-by: Nathan Scott <nathans@debian.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
debian/postinst

index 11693a6eb0046092e05556e8151b55e3a2b9125a..2ad9174658ceb4b3d8869610978da88bc77d7cba 100644 (file)
@@ -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
                ;;