Package: dmsetup Version: 2:1.02.137-2 Severity: normal Tags: patch Dear Maintainer,
When executed with any arguments, the blkdeactivate script fails with the following output: Deactivating block devices: /sbin/blkdeactivate: line 320: /bin/sort: No such file or directory This occurs because Debian ships sort as /usr/bin/sort instead of /bin/sort. The fix is simply to change or remove the path. The attached patch removes the path, since I can't see any risk as the script only uses options defined by POSIX. Thanks, Kevin -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.10.1-kevinoid1 (SMP w/4 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dmsetup depends on: ii libc6 2.24-9 ii libdevmapper1.02.1 2:1.02.137-2 dmsetup recommends no packages. dmsetup suggests no packages. -- no debconf information
>From ba6cfde40b8386b1a2630653cdbb99fd87cfeea7 Mon Sep 17 00:00:00 2001 Message-Id: <ba6cfde40b8386b1a2630653cdbb99fd87cfeea7.1491190631.git.ke...@kevinlocke.name> From: Kevin Locke <ke...@kevinlocke.name> Date: Sun, 2 Apr 2017 21:20:31 -0600 Subject: [PATCH] blkdeactivate: Change /bin/sort to sort Debian ships sort from GNU Coreutils as /usr/bin/sort rather than /bin/sort. This causes blkdeactivate to fail with the following: Deactivating block devices: /sbin/blkdeactivate: line 320: /bin/sort: No such file or directory To fix this in a portable way, remove the path from sort. Since all options used are specified by POSIX any builtin would have to provide them, so this does not pose any risk that I am aware of. Signed-off-by: Kevin Locke <ke...@kevinlocke.name> --- scripts/blkdeactivate.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in index 443af9cb2..fa62b2e09 100644 --- a/scripts/blkdeactivate.sh.in +++ b/scripts/blkdeactivate.sh.in @@ -56,7 +56,7 @@ MPATHD_OPTS="" LSBLK="/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" LSBLK_VARS="local devtype local kname local name local mnt" LSBLK_READ="read -r devtype kname name mnt" -SORT_MNT="/bin/sort -r -u -k 4" +SORT_MNT="sort -r -u -k 4" # Do not show tool errors by default (only done/skipping summary # message provided by this script) and no verbose mode by default. -- 2.11.0