mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-23 18:14:25 +08:00
e2scrub, e2scrub_all: don't sleep unnecessarily in exitcode
The two second sleep is only needed in e2scrub, and when there is a failure, so that systemd has a chance to gather the log output before e2scrub exits. It's not needed if the script is exiting successfully, and it's never needed for e2scrub_all ever. Addresses-Debian-Bug: #948193 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
d6e6373221
commit
0b3208958e
@ -66,7 +66,7 @@ exitcode() {
|
||||
# for capturing all the log messages if the scrub fails, because the
|
||||
# fail service uses the service name to gather log messages for the
|
||||
# error report.
|
||||
if [ -n "${SERVICE_MODE}" ]; then
|
||||
if [ -n "${SERVICE_MODE}" -a "${ret}" -ne 0 ]; then
|
||||
test "${ret}" -ne 0 && ret=1
|
||||
sleep 2
|
||||
fi
|
||||
|
@ -56,14 +56,8 @@ exitcode() {
|
||||
# section 22.2) and hope the admin will scan the log for what
|
||||
# actually happened.
|
||||
|
||||
# We have to sleep 2 seconds here because journald uses the pid to
|
||||
# connect our log messages to the systemd service. This is critical
|
||||
# for capturing all the log messages if the scrub fails, because the
|
||||
# fail service uses the service name to gather log messages for the
|
||||
# error report.
|
||||
if [ -n "${SERVICE_MODE}" ]; then
|
||||
if [ -n "${SERVICE_MODE}" -a "${ret}" -ne 0 ]; then
|
||||
test "${ret}" -ne 0 && ret=1
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
exit "${ret}"
|
||||
|
Loading…
Reference in New Issue
Block a user