File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ case "$variant" in
2424 ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants
2525 # And tmt wants to write to /usr/local/bin
2626 rm /usr/local -rf && ln -sr /var/usrlocal /usr/local && mkdir -p /var/usrlocal/bin
27+
28+ # tmt needs a webserver to verify the VM is running
29+ TESTCLOUD_GUEST=" python3 -m http.server 10022 || python -m http.server 10022 || /usr/libexec/platform-python -m http.server 10022 || python2 -m SimpleHTTPServer 10022 || python -m SimpleHTTPServer 10022"
30+ echo " $TESTCLOUD_GUEST " >> /opt/testcloud-guest.sh
31+ chmod +x /opt/testcloud-guest.sh
32+ echo " [Unit]" >> /etc/systemd/system/testcloud.service
33+ echo " Description=Testcloud guest integration" >> /etc/systemd/system/testcloud.service
34+ echo " After=cloud-init.service" >> /etc/systemd/system/testcloud.service
35+ echo " [Service]" >> /etc/systemd/system/testcloud.service
36+ echo " ExecStart=/bin/bash /opt/testcloud-guest.sh" >> /etc/systemd/system/testcloud.service
37+ echo " [Install]" >> /etc/systemd/system/testcloud.service
38+ echo " WantedBy=multi-user.target" >> /etc/systemd/system/testcloud.service
39+ systemctl enable testcloud.service
2740 ;;
2841 " " ) echo " No variant"
2942 ;;
You can’t perform that action at this time.
0 commit comments