summaryrefslogtreecommitdiffstats
path: root/modules.d/00warpclock/warpclock.sh
blob: fb4df0b8efe7ed7507ce5053cf3bb52bf4189cbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# This file is part of dracut warpclock module.
# SPDX-License-Identifier: GPL-2.0-or-later

# Set the kernel's timezone and reset the system time
# if adjtime is set to LOCAL.

if test -e /etc/adjtime; then
    while read -r line; do
        if test "$line" = LOCAL; then
            hwclock --systz
        fi
    done < /etc/adjtime
fi