mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
Added check of tmpfs size before syncing HDD to RAM.
This commit is contained in:
parent
18ace5438f
commit
df63737eac
5
log2ram
5
log2ram
@ -28,6 +28,11 @@ syncToDisk () {
|
|||||||
syncFromDisk () {
|
syncFromDisk () {
|
||||||
isSafe
|
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
|
if [ "$USE_RSYNC" = true ]; then
|
||||||
rsync -aXWv --delete --exclude log2ram.log --links $HDD_LOG $RAM_LOG 2>&1 | $LOG_OUTPUT
|
rsync -aXWv --delete --exclude log2ram.log --links $HDD_LOG $RAM_LOG 2>&1 | $LOG_OUTPUT
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user