make zram lines create and mount immediate

This commit is contained in:
StuartIanNaylor 2019-03-09 14:43:41 +00:00
parent c72bc41457
commit e2e1c65c5f
2 changed files with 2 additions and 4 deletions

View File

@ -69,11 +69,9 @@ case "$1" in
[ -d $HDD_LOG/ ] || mkdir $HDD_LOG/
mount --bind $RAM_LOG/ $HDD_LOG/
mount --make-private $HDD_LOG/
if [ "$ZL2R" = true ]; then
createZramLogDrive
fi
wait_for $HDD_LOG
if [ "$ZL2R" = true ]; then
createZramLogDrive
mount -t ext4 -o nosuid,noexec,nodev,user=log2ram /dev/zram${RAM_DEV} ${RAM_LOG}/
else
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=${SIZE} log2ram $RAM_LOG/

View File

@ -1,7 +1,7 @@
[Unit]
Description=Log2Ram
DefaultDependencies=no
Before=basic.target rsyslog.service syslog.target systemd-journald.service sysinit.target shutdown.target apache2.service
Before=basic.target rsyslog.service syslog.target systemd-journald.service sysinit.target shutdown.target zram-swap-conf.service apache2.service
After=local-fs.target
Conflicts=shutdown.target reboot.target halt.target
RequiresMountsFor=/var/log /var/hdd.log