]> git.ipfire.org Git - thirdparty/systemd.git/blame - test/TEST-17-UDEV-WANTS/test.sh
test: use "ln -fs"
[thirdparty/systemd.git] / test / TEST-17-UDEV-WANTS / test.sh
CommitLineData
3ac62a0e 1#!/bin/bash
3ac62a0e
LP
2set -e
3TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property"
4TEST_NO_NSPAWN=1
5
6. $TEST_BASE_DIR/test-functions
f775f613 7QEMU_TIMEOUT=300
3ac62a0e
LP
8
9test_setup() {
ec4cab49 10 create_empty_image_rootdir
3ac62a0e
LP
11
12 (
13 LOG_LEVEL=5
14 eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
15
16 setup_basic_environment
17
18 # mask some services that we do not want to run in these tests
976ed3b6
ZJS
19 ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
20 ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service
21 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service
22 ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket
23 ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service
3ac62a0e
LP
24
25 # setup the testsuite service
26 cat >$initdir/etc/systemd/system/testsuite.service <<EOF
27[Unit]
28Description=Testsuite service
29
30[Service]
23209bcd 31ExecStart=/bin/bash -x /testsuite.sh
3ac62a0e
LP
32Type=oneshot
33StandardOutput=tty
34StandardError=tty
35EOF
36 cp testsuite.sh $initdir/
37
38 setup_testsuite
cc469c3d 39 )
3ac62a0e
LP
40}
41
42do_test "$@"