mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
Added start, write and stop logging
This commit is contained in:
parent
658161bb04
commit
4479c11a41
16
log2ram
16
log2ram
@ -56,20 +56,36 @@ case "$1" in
|
|||||||
mount --bind $RAM_LOG/ $HDD_LOG/
|
mount --bind $RAM_LOG/ $HDD_LOG/
|
||||||
mount --make-private $HDD_LOG/
|
mount --make-private $HDD_LOG/
|
||||||
wait_for $HDD_LOG
|
wait_for $HDD_LOG
|
||||||
|
|
||||||
rm -f $LOG2RAM_LOG
|
rm -f $LOG2RAM_LOG
|
||||||
|
|
||||||
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/
|
||||||
wait_for $RAM_LOG
|
wait_for $RAM_LOG
|
||||||
|
|
||||||
|
echo "> Starting..." | $LOG_OUTPUT
|
||||||
|
|
||||||
syncFromDisk
|
syncFromDisk
|
||||||
|
|
||||||
|
echo "> Starting: done." | $LOG_OUTPUT
|
||||||
;;
|
;;
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
|
echo "> Stopping..." | $LOG_OUTPUT
|
||||||
|
|
||||||
syncToDisk
|
syncToDisk
|
||||||
|
|
||||||
|
echo "> Stopping: done." | $LOG_OUTPUT
|
||||||
|
|
||||||
umount -l $RAM_LOG/
|
umount -l $RAM_LOG/
|
||||||
umount -l $HDD_LOG/
|
umount -l $HDD_LOG/
|
||||||
;;
|
;;
|
||||||
|
|
||||||
write)
|
write)
|
||||||
|
echo "> Writing..." | $LOG_OUTPUT
|
||||||
|
|
||||||
syncToDisk
|
syncToDisk
|
||||||
|
|
||||||
|
echo "> Writing: done." | $LOG_OUTPUT
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user