5 systemd_target=basic.target
6 post_command="/usr/bin/systemctl exit \$EXIT_STATUS"
8 while [[ $# -gt 0 ]]; do
12 systemd_target=multi-user.target
13 post_command="echo you can now log in as root (no password) and then turn off by running \'/usr/bin/systemctl exit \$EXIT_STATUS\'"
16 echo "Unknow commandline argument $1"
22 WORKDIR=${FDO_DISTRIBUTION_WORKINGDIR:-$PWD}
23 B2C_WORKDIR=${FDO_B2C_WORKDIR:-/app}
25 # remove root password for debugging
26 sed -i 's/root:!locked::/root:::/' /etc/shadow
28 # create a libinput test suite service
29 cat <<EOF > /etc/systemd/system/libinput-testsuite.service
32 Description=Libinput test suite
37 StandardOutput=journal+console
38 EnvironmentFile=$B2C_WORKDIR/.b2c_env
39 WorkingDirectory=$WORKDIR
40 ExecStart=$WORKDIR/.gitlab-ci/meson-build.sh --skip-setup --skip-build
42 # exit the container on termination
43 ExecStopPost=$post_command
46 WantedBy=default.target
49 cat /etc/systemd/system/libinput-testsuite.service
52 systemctl enable libinput-testsuite.service
54 # disable some services we don't need in the CI
55 systemctl mask network-online.target
56 systemctl mask network-pre.target
57 systemctl mask timers.target
58 systemctl mask dnf-makecache.timer
59 systemctl mask systemd-logind.service
60 systemctl mask rpmdb-migrate.service
61 systemctl mask systemd-network-generator.service
62 systemctl mask cryptsetup-pre.target
63 systemctl mask cryptsetup.target
65 #change default target
66 systemctl set-default $systemd_target