]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: fix the loop dev support check
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 11 Mar 2021 11:49:00 +0000 (12:49 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 11 Mar 2021 13:42:33 +0000 (14:42 +0100)
Since f17bdf8264e231fa31c769bff2475ef698487d0b the test-repart was
effectively disabled, since `/dev/loop-control` is a character special
file, whereas `-f` works only on regular files. Even though we could use
`-c` to check specifically for character special files, let's use `-e`
just in case.

src/partition/test-repart.sh

index 0910d68078c3eb0df6cd80db32243a51fb4db116..d21865dd6470d4b8b7418e0b1e968fb29732e5ef 100755 (executable)
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 set -ex
 
-[[ -f /dev/loop-control ]] || exit 77
+[[ -e /dev/loop-control ]] || exit 77
 
 repart=$1
 test -x $repart