6.12stretch4.14.32+dietpi script/etc/cron.hourly/dietpi:
rm: cannot remove '/var/lib/dietpi/dietpi-ramlog/storage': No such file or directory
The removal of /var/lib/dietpi/dietpi-ramlog/storage/ fails only a single time after the update from 6.11 to 6.12.
The rm calls here:
and here
are missing a [[ -d /var/lib/dietpi/dietpi-ramlog/storage ]] check and instead try to remove the directory in question unconditionally.
@sergiud
Thanks for your report.
We changed dietpi-ramlog storage location but forgot to adjust this within cron job: https://github.com/Fourdee/DietPi/commit/e85f2efa39bd7d3867f06a804149c47c45c3170e#diff-9beb868c8b43c2fb4363fc06b6fab912
The error message is harmless, this part of the cron job uncritical, just intended to be failsafe. Adding directory existence check is a good idea anyway 馃憤.
We will fix this for v6.13: https://github.com/Fourdee/DietPi/pull/1949
Okay we simply removed the ramlog storage update from cron job. The idea of writing (even that those are just empty files => each 4k block) files to disk, while ramlog is intended to reduce disk I/O is not worth it. /var/log file/folder structure will be stored on reboot, which is scheduled after every dietpi-software and dietpi-update run.
I will mark the issue as closed, as the fix is very trivial now :): https://github.com/Fourdee/DietPi/commit/76ed84a88edaf8023617281e0a05f7d70fe88219
Most helpful comment
Okay we simply removed the ramlog storage update from cron job. The idea of writing (even that those are just empty files => each 4k block) files to disk, while ramlog is intended to reduce disk I/O is not worth it. /var/log file/folder structure will be stored on reboot, which is scheduled after every dietpi-software and dietpi-update run.
I will mark the issue as closed, as the fix is very trivial now :): https://github.com/Fourdee/DietPi/commit/76ed84a88edaf8023617281e0a05f7d70fe88219