summaryrefslogtreecommitdiff
path: root/xi/s6/sv/hwclock/down
blob: 5349d212e5e4ddda970a372475b7a9165b72d4d4 (plain)
1
2
3
4
5
6
#!/bin/execlineb -P
if { s6-echo "[     Shutdown   ]     : Saving sytem clock to rtc0" }
envfile /etc/s6/s6.conf
importas -iu HARDWARECLOCK HARDWARECLOCK
foreground { if { s6-test $HARDWARECLOCK = UTC } hwclock --systohc --utc --noadjfile }
foreground { if { s6-test $HARDWARECLOCK = localtime } hwclock --systohc --localtime --noadjfile }