瀏覽代碼

Merge pull request #14 from Sailing74/checkdirsize

Added check of tmpfs size before syncing HDD to RAM.
tags/v1.1
azlux 7 年之前
committed by GitHub
父節點
當前提交
c7870156ec
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      log2ram

+ 5
- 0
log2ram 查看文件

@@ -28,6 +28,11 @@ syncToDisk () {
syncFromDisk () {
isSafe

if [ ! -z `du -sh -t $SIZE $HDD_LOG | cut -f1` ]; then
echo "ERROR: RAM disk too small. Can't sync."
exit 1
fi

if [ "$USE_RSYNC" = true ]; then
rsync -aXWv --delete --exclude log2ram.log --links $HDD_LOG $RAM_LOG 2>&1 | $LOG_OUTPUT
else


Loading…
取消
儲存