From: Mike Gilbert <floppym@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message
Date: Sun, 25 Jun 2023 13:51:56 -0400 [thread overview]
Message-ID: <20230625175156.1368764-1-floppym@gentoo.org> (raw)
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
eclass/acct-group.eclass | 2 +-
eclass/acct-user.eclass | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 8d2d3adb7221..a0ad86066309 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -179,7 +179,7 @@ acct-group_pkg_preinst() {
fi
elog "Adding group ${ACCT_GROUP_NAME}"
- groupadd "${opts[@]}" "${ACCT_GROUP_NAME}" || die
+ groupadd "${opts[@]}" "${ACCT_GROUP_NAME}" || die "groupadd failed with status $?"
}
fi
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 88d7d354c8e6..b03bf0f1ab28 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -362,7 +362,7 @@ acct-user_pkg_preinst() {
fi
elog "Adding user ${ACCT_USER_NAME}"
- useradd "${opts[@]}" "${ACCT_USER_NAME}" || die
+ useradd "${opts[@]}" "${ACCT_USER_NAME}" || die "useradd failed with status $?"
_ACCT_USER_ADDED=1
fi
@@ -454,7 +454,7 @@ acct-user_pkg_postinst() {
eerror " usermod ${optsq[@]} ${ACCT_USER_NAME}"
else
eerror "$(<"${T}/usermod-error.log")"
- die "usermod failed"
+ die "usermod failed with status ${status}"
fi
fi
}
@@ -502,7 +502,7 @@ acct-user_pkg_prerm() {
fi
elog "Locking user ${ACCT_USER_NAME}"
- usermod "${opts[@]}" "${ACCT_USER_NAME}" || die
+ usermod "${opts[@]}" "${ACCT_USER_NAME}" || die "usermod failed with status $?"
}
fi
--
2.41.0
next reply other threads:[~2023-06-25 17:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-25 17:51 Mike Gilbert [this message]
2023-06-25 18:52 ` [gentoo-dev] [PATCH] acct-user.eclass: include exit status in death message Michał Górny
2023-06-25 20:15 ` Oskari Pirhonen
2023-06-25 22:15 ` Mike Gilbert
2023-06-26 2:00 ` Sam James
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=20230625175156.1368764-1-floppym@gentoo.org \
--to=floppym@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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