Move tmp to a ramdisk
This commit is contained in:
parent
8f11ab2102
commit
42d5bc9321
|
@ -113,6 +113,17 @@ function detect_usb_drive {
|
||||||
write_config_param USB_DRIVE "$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 {
|
function remove_bluetooth {
|
||||||
rmmod -f bnep
|
rmmod -f bnep
|
||||||
rmmod -f bluetooth
|
rmmod -f bluetooth
|
||||||
|
@ -549,6 +560,9 @@ function setup_utils {
|
||||||
read_config_param "PROJECT_REPO"
|
read_config_param "PROJECT_REPO"
|
||||||
write_config_param "PROJECT_REPO" "$PROJECT_REPO"
|
write_config_param "PROJECT_REPO" "$PROJECT_REPO"
|
||||||
|
|
||||||
|
function_check separate_tmp_filesystem
|
||||||
|
separate_tmp_filesystem 20
|
||||||
|
|
||||||
function_check disable_null_passwords
|
function_check disable_null_passwords
|
||||||
disable_null_passwords
|
disable_null_passwords
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue