Linux XFS filesystem development
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>, nathans@redhat.com
Subject: [PATCH] debian: don't fail postinst when upgrading chroot
Date: Mon, 26 Feb 2018 14:43:30 -0800	[thread overview]
Message-ID: <20180226224330.GC19318@magnolia> (raw)

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
 		;;
 

             reply	other threads:[~2018-02-26 22:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 22:43 Darrick J. Wong [this message]
2018-02-26 22:55 ` [PATCH] debian: don't fail postinst when upgrading chroot Nathan Scott

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=20180226224330.GC19318@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=nathans@redhat.com \
    --cc=sandeen@redhat.com \
    /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