mirror of
https://git.proxmox.com/git/systemd
synced 2026-01-11 22:05:22 +00:00
20 lines
549 B
Bash
Executable File
20 lines
549 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
. `dirname $0`/assert.sh
|
|
|
|
ORIG_TZ=`grep -v '^#' /etc/timezone`
|
|
echo "original tz: $ORIG_TZ"
|
|
|
|
# should activate daemon and work
|
|
assert_in "Local time:" "`timedatectl --no-pager`"
|
|
|
|
# change timezone
|
|
assert_eq "`timedatectl --no-pager set-timezone Europe/Moscow 2>&1`" ""
|
|
assert_eq "`cat /etc/timezone`" "Europe/Moscow"
|
|
assert_in "Time.*zone: Europe/Moscow (MSK, +" "`timedatectl --no-pager`"
|
|
|
|
# reset timezone to original
|
|
assert_eq "`timedatectl --no-pager set-timezone $ORIG_TZ 2>&1`" ""
|
|
assert_eq "`cat /etc/timezone`" "$ORIG_TZ"
|