]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/TEST-30-ONCLOCKCHANGE/test.sh
treewide: more portable bash shebangs
[thirdparty/systemd.git] / test / TEST-30-ONCLOCKCHANGE / test.sh
1 #!/usr/bin/env bash
2 set -e
3 TEST_DESCRIPTION="test OnClockChange= + OnTimezoneChange="
4 TEST_NO_NSPAWN=1
5
6 . $TEST_BASE_DIR/test-functions
7
8 test_setup() {
9 create_empty_image_rootdir
10
11 (
12 LOG_LEVEL=5
13 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
14
15 inst_any /usr/share/zoneinfo/Europe/Kiev
16 inst_any /usr/share/zoneinfo/Europe/Berlin
17
18 setup_basic_environment
19 mask_supporting_services
20
21 # extend the watchdog
22 mkdir -p $initdir/etc/systemd/system/systemd-timedated.service.d
23 cat >$initdir/etc/systemd/system/systemd-timedated.service.d/watchdog.conf <<EOF
24 [Service]
25 WatchdogSec=10min
26 EOF
27
28 # setup the testsuite service
29 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
30 [Unit]
31 Description=Testsuite service
32
33 [Service]
34 ExecStart=/testsuite.sh
35 Type=oneshot
36 EOF
37 cp testsuite.sh $initdir/
38
39 setup_testsuite
40 )
41 }
42
43 do_test "$@"