Browse Source

add size check for zram

fix #99
tags/1.5
Azlux 4 years ago
parent
commit
881eea145f
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      log2ram

+ 6
- 1
log2ram View File

@@ -23,7 +23,12 @@ syncToDisk () {
syncFromDisk () {
isSafe
if [ ! -z "$(du -sh -t "$SIZE" $HDD_LOG/ | cut -f1)" ]; then
TP_SIZE=$SIZE
if [ "$ZL2R" = true ]; then
TP_SIZE=$LOG_DISK_SIZE
then
if [ ! -z "$(du -sh -t "$TP_SIZE" $HDD_LOG/ | cut -f1)" ]; then
echo "ERROR: RAM disk for "$HDD_LOG/" too small. Can't sync."
umount -l $RAM_LOG/
umount -l $HDD_LOG/


Loading…
Cancel
Save