Skip to content

Commit

Permalink
Do not fail if required mountpoint does not exist
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
  • Loading branch information
legionus committed Jun 17, 2023
1 parent 3e88d94 commit 43558a2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions data/lib/initrd/boot/scripts/mountpoints
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ while [ -z "${eof-}" ]; do
read -r fsdev fsdir _ ||
eof=1

[ -n "$fsdev" ] ||
[ -n "$fsdev" ] && [ -d "$fsdir" ] ||
continue

if [ -n "${ROOTONLY-}" ]; then
[ "$fsdir" = "$rootmnt" ] ||
continue
fi

[ -d "$fsdir" ] ||
fatal "$fsdir: Does not exist"

mountpoint -q "$fsdir" ||
fatal "$fsdir: Not mounted"

Expand Down

0 comments on commit 43558a2

Please sign in to comment.