better read-only detection for Linux

This commit is contained in:
Jérémy Lecour 2020-03-02 14:43:47 +01:00 committed by Jérémy Lecour
parent 29ac93e250
commit a811b008c7
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ is_repository_readonly() {
mount | grep ${partition} | grep -q "read-only"
else
mountpoint=$(stat -c '%m' $1)
findmnt ${mountpoint} --noheadings --output OPTIONS | grep -q -E "\bro\b"
findmnt ${mountpoint} --noheadings --output OPTIONS -O ro
fi
}
remount_repository_readwrite() {