# check filesystems in VGs that have at least 256MB (or so) of
# free space.
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
snap_size_mb=256
fstrim=0
reap=0
exitcode 1
fi
+if ! type lsblk >& /dev/null ; then
+ echo "e2scrub: can't find lsblk --- is util-linux installed?"
+ exitcode 1
+fi
+
+if ! type lvcreate >& /dev/null ; then
+ echo "e2scrub: can't find lvcreate --- is lvm2 installed?"
+ exitcode 1
+fi
+
# Find the device for a given mountpoint
dev_from_mount() {
local mountpt="$(realpath "$1")"
# along with this program; if not, write the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
scrub_all=0
conffile="@root_sysconfdir@/e2scrub.conf"
done
shift "$((OPTIND - 1))"
+# 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.
+
+if ! type lsblk >& /dev/null ; then
+ echo "e2scrub_all: can't find lsblk --- is util-linux installed?"
+ exitcode 0
+fi
+
+if ! type lvcreate >& /dev/null ; then
+ echo "e2scrub_all: can't find lvcreate --- is lvm2 installed?"
+ exitcode 0
+fi
+
# Find scrub targets, make sure we only do this once.
ls_scrub_targets() {
lsblk -o NAME,FSTYPE,MOUNTPOINT -p -P -n | while read vars; do