Skip to content

Commit

Permalink
v6.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Knight committed Jan 5, 2019
1 parent bff17ab commit 3c34712
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
13 changes: 11 additions & 2 deletions PREP_SYSTEM_FOR_DIETPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:'
Expand Down
11 changes: 9 additions & 2 deletions dietpi/patch_file
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3c34712

Please sign in to comment.