mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Add some error trapping
This commit is contained in:
parent
5d7664812b
commit
5d6b908685
14
raspi-config
14
raspi-config
@ -1811,7 +1811,7 @@ enable_overlayfs() {
|
||||
if get_bootro_now ; then
|
||||
if ! mount -o remount,rw /boot 2>/dev/null ; then
|
||||
echo "Unable to mount boot partition as writable - cannot enable"
|
||||
return
|
||||
return 1
|
||||
fi
|
||||
BOOTRO=yes
|
||||
else
|
||||
@ -1913,7 +1913,7 @@ disable_overlayfs() {
|
||||
if get_bootro_now ; then
|
||||
if ! mount -o remount,rw /boot 2>/dev/null ; then
|
||||
echo "Unable to mount boot partition as writable - cannot disable"
|
||||
return
|
||||
return 1
|
||||
fi
|
||||
BOOTRO=yes
|
||||
else
|
||||
@ -1958,11 +1958,17 @@ do_overlayfs() {
|
||||
fi
|
||||
if [ $RET -eq $CURRENT ]; then
|
||||
if [ $RET -eq 0 ]; then
|
||||
enable_overlayfs
|
||||
if enable_overlayfs; then
|
||||
STATUS="enabled"
|
||||
else
|
||||
STATUS="unchanged"
|
||||
fi
|
||||
elif [ $RET -eq 1 ]; then
|
||||
disable_overlayfs
|
||||
if disable_overlayfs; then
|
||||
STATUS="disabled"
|
||||
else
|
||||
STATUS="unchanged"
|
||||
fi
|
||||
else
|
||||
return $RET
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user