Make mesh router drive read only after initial setup

This commit is contained in:
Bob Mottram 2016-12-09 19:47:54 +00:00
parent f12200edd5
commit f1f65d61d2
1 changed files with 9 additions and 0 deletions

View File

@ -109,6 +109,14 @@ function create_ram_disk {
fi
}
function make_root_read_only {
if [ ! -d /home/$MY_USERNAME/Desktop ]; then
if ! grep 'ro,subvol=@' /etc/fstab; then
sed -i 's|subvol=@|ro,subvol=@|g' /etc/fstab
fi
fi
}
function tmp_ram_disk {
ramdisk_size_mb=$1
if [ ! -d /tmp ]; then
@ -589,6 +597,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
#setup_tahoelafs
setup_ipfs
mesh_amnesic
make_root_read_only
if [ ! -f $MESH_AMNESIC ]; then
rm $MESH_INSTALL_SETUP