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"
|
mount | grep ${partition} | grep -q "read-only"
|
||||||
else
|
else
|
||||||
mountpoint=$(stat -c '%m' $1)
|
mountpoint=$(stat -c '%m' $1)
|
||||||
findmnt ${mountpoint} --noheadings --output OPTIONS | grep -q -E "\bro\b"
|
findmnt ${mountpoint} --noheadings --output OPTIONS -O ro
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
remount_repository_readwrite() {
|
remount_repository_readwrite() {
|
||||||
|
|
Loading…
Reference in a new issue