From be395a8ada56d3f68a3fff6d38ba4138a9c97608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 11 Jul 2017 23:56:30 +0200 Subject: [PATCH] Do not use full path to mountpoint program It may reside in different places (/bin in Debian, /usr/bin in Fedora). Use $PATH for this. --- umount_kill.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umount_kill.sh b/umount_kill.sh index b6b1b00..be44dd2 100755 --- a/umount_kill.sh +++ b/umount_kill.sh @@ -88,13 +88,13 @@ umount_kill() { if ! [ "${kill_only}" ]; then # Mount point found in mtab - if $(sudo /usr/bin/mountpoint -q "${dir}"); then + if $(sudo mountpoint -q "${dir}"); then info "umount ${dir}" sudo umount -n "${dir}" 2> /dev/null || \ sudo umount -n -l "${dir}" 2> /dev/null || \ error "umount ${dir} unsuccessful!" - # Umount entries not found within '/usr/bin/mountpoint' + # Umount entries not found within 'mountpoint' else # Look for (deleted) mountpoints info "not a regular mount point: ${dir}"