From e1fc1b19a0eae9376dbeaec94c2488ee93a754fc Mon Sep 17 00:00:00 2001 From: velvettear Date: Thu, 5 Oct 2023 13:18:48 +0200 Subject: [PATCH] modified script to mount '/etc/fstab' entries on boot --- alpine_install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alpine_install.sh b/alpine_install.sh index d0de0e5..952b6f4 100755 --- a/alpine_install.sh +++ b/alpine_install.sh @@ -111,6 +111,11 @@ options="defaults,noatime" printf "|> setting up '/var/cache' as tmpfs...\n" && rm -rf "/var/cache/*" &> /dev/null && printf "cache\t/var/cache\ttmpfs\t$options 0 0\n" >> "/etc/fstab" printf "|> setting up '/var/log' as tmpfs...\n" && rm -rf "/var/log/*" &> /dev/null && printf "logs\t/var/log\ttmpfs\t$options 0 0\n" >> "/etc/fstab" printf "|> setting up '/tmp' as tmpfs...\n" && rm -rf "/tmp/*" &> /dev/null && printf "tmp\t/tmp\ttmpfs\t$options,mode=1777 0 0\n" >> "/etc/fstab" +printf "|> setting up '/root/.cache' as tmpfs...\n" && rm -rf "/root/.cache/*" &> /dev/null && printf "root-cache\t/root/.cache\ttmpfs\t$options 0 0\n" >> "/etc/fstab" +printf "|> setting up '/home/$user/.cache' as tmpfs...\n" && rm -rf "/home/$user/.cache/*" &> /dev/null && printf "user-cache\t/home/$user/.cache\ttmpfs\t$options 0 0\n" >> "/etc/fstab" + +printf "|> modifying '/etc/init.d/localmount'...\n" +sed -i 's/keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver/keyword -docker -jail -prefix -systemd-nspawn -vserver/' "/etc/init.d/localmount" printf "|> remounting '/etc/fstab' entries...\n" mount -a