]> 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>
Fri, 12 Mar 2021 16:35:57 +0000 (17:35 +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.

(cherry picked from commit 3a1bc3fcc02e61683e815091d129b03ad10771ef)

src/partition/test-repart.sh

index 9af3049b6b2db5c40e57708c6039b59d8daa9b8a..8c996be4957256d12c14f3979639a8d923e7b1dd 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 set -ex
 
-[[ -f /dev/loop-control ]] || exit 77
+[[ -e /dev/loop-control ]] || exit 77
 
 repart=$1
 test -x $repart