diff options
author | Theodore Ts'o <tytso@mit.edu> | 2019-09-23 13:17:13 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-09-23 13:17:13 -0400 |
commit | 8111b79da71e24bf945ea3ff8b6a83ecc779f932 (patch) | |
tree | 92ecb956df9fa6ffd626003ceb8537c62a9230ba /scrub/e2scrub_all.in | |
parent | 1b866f5584bc9deefab7c657895413eb7f13f1f9 (diff) | |
download | e2fsprogs-8111b79da71e24bf945ea3ff8b6a83ecc779f932.tar.gz |
e2scrub_all: make sure fd 3 is closed before running lvm commands
Some versions of cron leave fd 3 open for some unknown reason. So
when e2scrub_all is run by cron (on non-systemd systems) this results
in an annoying message from the Cron Daemon because lvm will print
warning messages about "leaked file descriptors. So force close fd 3
at the beginning of e2scrub and e2scrub_all.
Addresses-Debian-Bug: #940240
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'scrub/e2scrub_all.in')
-rw-r--r-- | scrub/e2scrub_all.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in index 2c563672..1418a229 100644 --- a/scrub/e2scrub_all.in +++ b/scrub/e2scrub_all.in @@ -85,6 +85,9 @@ then exitcode 0 fi +# close file descriptor 3 (from cron) since it causes lvm to kvetch +exec 3<&- + # If some prerequisite packages are not installed, exit with a code # indicating success to avoid spamming the sysadmin with fail messages # when e2scrub_all is run out of cron or a systemd timer. |