about summary refs log tree commit diff
path: root/shutdown.d/40-hwclock.sh
diff options
context:
space:
mode:
authorBas Ploeger <5904333+basploeger@users.noreply.github.com>2022-04-09 23:52:37 +0200
committerToyam Cox <aviator45003@gmail.com>2023-01-09 13:24:59 -0500
commit69876b5981557910d05b119c91a492f93016ddf5 (patch)
tree0a2af0773f2296828be0ffba85d8f46bd54447ed /shutdown.d/40-hwclock.sh
parentfa197f0d9e18070b6b28cfdd38f22fbc8cf2f69d (diff)
downloadrunit-void-69876b5981557910d05b119c91a492f93016ddf5.tar.gz
runit-void-69876b5981557910d05b119c91a492f93016ddf5.tar.xz
runit-void-69876b5981557910d05b119c91a492f93016ddf5.zip
Split run-level 3 script into separate files.
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