diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index e124271d..22003a92 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -113,6 +113,17 @@ function detect_usb_drive { write_config_param USB_DRIVE "$USB_DRIVE" } +function separate_tmp_filesystem { + tmp_filesystem_size_mb=$1 + if [ ! -d /tmp ]; then + mkdir -p /tmp + fi + if ! grep -q '/tmp' /etc/fstab; then + mount -t tmpfs -o size=${tmp_filesystem_size_mb}m tmpfs /tmp + echo "tmpfs /tmp tmpfs nodev,nosuid,noexec,nodiratime,size=${tmp_filesystem_size_mb}M 0 0" >> /etc/fstab + fi +} + function remove_bluetooth { rmmod -f bnep rmmod -f bluetooth @@ -549,6 +560,9 @@ function setup_utils { read_config_param "PROJECT_REPO" write_config_param "PROJECT_REPO" "$PROJECT_REPO" + function_check separate_tmp_filesystem + separate_tmp_filesystem 20 + function_check disable_null_passwords disable_null_passwords