From 3c34712afb705edc290231f01ed161e86ac90a79 Mon Sep 17 00:00:00 2001 From: Daniel Knight Date: Sat, 5 Jan 2019 22:59:18 +0000 Subject: [PATCH] v6.20 + Fix for: https://github.com/Fourdee/DietPi/issues/2396#issuecomment-451686173 --- PREP_SYSTEM_FOR_DIETPI.sh | 13 +++++++++++-- dietpi/patch_file | 11 +++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/PREP_SYSTEM_FOR_DIETPI.sh b/PREP_SYSTEM_FOR_DIETPI.sh index fbc78a4b9e..e69574b374 100644 --- a/PREP_SYSTEM_FOR_DIETPI.sh +++ b/PREP_SYSTEM_FOR_DIETPI.sh @@ -1261,11 +1261,20 @@ _EOF_ G_DIETPI-NOTIFY 2 'Configuring fake-hwclock:' # - allow times in the past + systemctl stop fake-hwclock + G_CONFIG_INJECT 'FORCE=' 'FORCE=force' /etc/default/fake-hwclock - # Move data store to RAM: https://github.com/Fourdee/DietPi/issues/2396 + # - Move fake-hwclock data store to RAM: https://github.com/Fourdee/DietPi/issues/2396 systemctl stop fake-hwclock G_CONFIG_INJECT 'FILE=' 'FILE=/tmp/fake-hwclock.dat' /etc/default/fake-hwclock - rm -f /etc/fake-hwclock.data + cat << _EOF_ > /lib/systemd/system/fake-hwclock.service.d/dietpi-ram.conf +[Service] +ExecStartPre=$(which cp) /etc/fake-hwclock.dat /tmp/fake-hwclock.dat +#ExecStart=$(which fake-hwclock) load $FORCE +ExecStopPre=$(which fake-hwclock) save +ExecStop=$(which cp) /tmp/fake-hwclock.dat /etc/fake-hwclock.dat +_EOF_ + systemctl daemon-reload systemctl restart fake-hwclock G_DIETPI-NOTIFY 2 'Configuring enable serial console:' diff --git a/dietpi/patch_file b/dietpi/patch_file index 0a70aa31ab..f07b63ad65 100644 --- a/dietpi/patch_file +++ b/dietpi/patch_file @@ -1524,9 +1524,16 @@ Also have a look at "Sonarr", another alternative TV show manager, available for #Move fake-hwclock data store to RAM: https://github.com/Fourdee/DietPi/issues/2396 systemctl stop fake-hwclock G_CONFIG_INJECT 'FILE=' 'FILE=/tmp/fake-hwclock.dat' /etc/default/fake-hwclock - rm -f /etc/fake-hwclock.data + cat << _EOF_ > /lib/systemd/system/fake-hwclock.service.d/dietpi-ram.conf +[Service] +ExecStartPre=$(which cp) /etc/fake-hwclock.dat /tmp/fake-hwclock.dat +#ExecStart=$(which fake-hwclock) load $FORCE +ExecStopPre=$(which fake-hwclock) save +ExecStop=$(which cp) /tmp/fake-hwclock.dat /etc/fake-hwclock.dat +_EOF_ + systemctl daemon-reload systemctl restart fake-hwclock - #------------------------------------------------------------------------------- + #------------------------------------------------------------------------------- fi