From e2e1c65c5f55d79b2bef03e2fda1deb5c8cc9507 Mon Sep 17 00:00:00 2001 From: StuartIanNaylor Date: Sat, 9 Mar 2019 14:43:41 +0000 Subject: [PATCH] make zram lines create and mount immediate --- log2ram | 4 +--- log2ram.service | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/log2ram b/log2ram index 808e98f..1f60ef3 100755 --- a/log2ram +++ b/log2ram @@ -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/ diff --git a/log2ram.service b/log2ram.service index 89f1cb8..d97e76d 100644 --- a/log2ram.service +++ b/log2ram.service @@ -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