mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
make zram lines create and mount immediate
This commit is contained in:
parent
c72bc41457
commit
e2e1c65c5f
4
log2ram
4
log2ram
@ -69,11 +69,9 @@ case "$1" in
|
|||||||
[ -d $HDD_LOG/ ] || mkdir $HDD_LOG/
|
[ -d $HDD_LOG/ ] || mkdir $HDD_LOG/
|
||||||
mount --bind $RAM_LOG/ $HDD_LOG/
|
mount --bind $RAM_LOG/ $HDD_LOG/
|
||||||
mount --make-private $HDD_LOG/
|
mount --make-private $HDD_LOG/
|
||||||
if [ "$ZL2R" = true ]; then
|
|
||||||
createZramLogDrive
|
|
||||||
fi
|
|
||||||
wait_for $HDD_LOG
|
wait_for $HDD_LOG
|
||||||
if [ "$ZL2R" = true ]; then
|
if [ "$ZL2R" = true ]; then
|
||||||
|
createZramLogDrive
|
||||||
mount -t ext4 -o nosuid,noexec,nodev,user=log2ram /dev/zram${RAM_DEV} ${RAM_LOG}/
|
mount -t ext4 -o nosuid,noexec,nodev,user=log2ram /dev/zram${RAM_DEV} ${RAM_LOG}/
|
||||||
else
|
else
|
||||||
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=${SIZE} log2ram $RAM_LOG/
|
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=${SIZE} log2ram $RAM_LOG/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Log2Ram
|
Description=Log2Ram
|
||||||
DefaultDependencies=no
|
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
|
After=local-fs.target
|
||||||
Conflicts=shutdown.target reboot.target halt.target
|
Conflicts=shutdown.target reboot.target halt.target
|
||||||
RequiresMountsFor=/var/log /var/hdd.log
|
RequiresMountsFor=/var/log /var/hdd.log
|
||||||
|
Loading…
x
Reference in New Issue
Block a user