Skip to content
Snippets Groups Projects
Unverified Commit bc740ddb authored by Bob Mottram's avatar Bob Mottram
Browse files

mesh peer tmp directory in a ram disk

parent b51b69a1
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,9 @@ FIRST_BOOT=/home/$MY_USERNAME/.first_boot
# Tomb containing logs
TOMB_LOG_SIZE_MB=10
# tmp directory
TOMB_TMP_SIZE_MB=10
# size of the tomb used to store qtox settings
TOMB_TOX_SIZE_MB=10
......@@ -106,6 +109,17 @@ function create_ram_disk {
fi
}
function tmp_ram_disk {
ramdisk_size_mb=$1
if [ ! -d /tmp ]; then
mkdir -p /tmp
fi
if ! grep -q '/tmp' /etc/fstab; then
mount -t tmpfs -o size=${ramdisk_size_mb}m tmpfs /tmp
echo "tmpfs /tmp tmpfs nodev,nosuid,noexec,nodiratime,size=${ramdisk_size_mb}M 0 0" >> /etc/fstab
fi
}
function set_hostname {
DEFAULT_DOMAIN_NAME="$1"
......@@ -565,10 +579,11 @@ if [ -f $MESH_INSTALL_SETUP ]; then
chown ${MY_USERNAME}:${MY_USERNAME} /home/$MY_USERNAME/.config
fi
tomb slam all
#tomb slam all
tmp_ram_disk 10
enable_batman_daemon
create_ram_disk 1
setup_amnesic_data
#create_ram_disk 1
#setup_amnesic_data
change_avahi_name
configure_toxcore
create_tox_user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment