about summary refs log tree commit diff
path: root/shutdown.d/40-hwclock.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shutdown.d/40-hwclock.sh')
-rw-r--r--shutdown.d/40-hwclock.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/shutdown.d/40-hwclock.sh b/shutdown.d/40-hwclock.sh
new file mode 100644
index 0000000..490ad73
--- /dev/null
+++ b/shutdown.d/40-hwclock.sh
@@ -0,0 +1,3 @@
+if [ -z "$VIRTUALIZATION" -a -n "$HARDWARECLOCK" ]; then
+    hwclock --systohc ${HARDWARECLOCK:+--$(echo $HARDWARECLOCK |tr A-Z a-z)}
+fi