Last active
February 7, 2021 09:33
-
-
Save tomtwinkle/d02d9c2c66457a97752032f778113a63 to your computer and use it in GitHub Desktop.
Raspberry Pi rootfs ROM control function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Raspberry Pi rootfs ROM control function | |
function rsfsrom() { | |
case $1 in | |
"status" ) | |
raspi-config nonint get_overlay_now && echo "enable" || echo "disabled" | |
;; | |
"enable" ) | |
sudo raspi-config nonint enable_overlayfs && | |
echo -e "rootfs ROM is enable. system reboot required.\n> sudo systemctl reboot" | |
;; | |
"disable" ) | |
sudo raspi-config nonint disable_overlayfs && | |
echo -e "rootfs ROM is disable. system reboot required.\n> sudo systemctl reboot" | |
;; | |
* ) | |
cat << EOS | |
Raspberry Pi rootfs ROM control | |
usage: rsfsrom [OPTION] | |
[OPTION] | |
status :show rootfs rom status. [enable/disable] | |
enable :rootfs rom enable, | |
must be user can "sudo raspi-config", | |
system reboot required. | |
disable :rootfs rom disable, | |
must be user can "sudo raspi-config", | |
system reboot required. | |
EOS | |
;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment