better read-only detection for Linux
This commit is contained in:
parent
29ac93e250
commit
a811b008c7
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue