]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
semaphoreci: run dhclient manually on setup
authorLuca Boccassi <bluca@debian.org>
Tue, 5 Apr 2022 21:23:49 +0000 (22:23 +0100)
committerLuca Boccassi <bluca@debian.org>
Tue, 5 Apr 2022 23:24:11 +0000 (00:24 +0100)
For some reason the guest container stopped having its
network interface configured. Run the dhcp client manually.

.semaphore/semaphore-runner.sh

index 7ed67732130abe8e347bdf11067a37b0097f85f5..80fd9b76f770061364c6a3921a323bbfb910ed48 100755 (executable)
@@ -36,8 +36,11 @@ create_container() {
     # enable source repositories so that apt-get build-dep works
     sudo lxc-attach -n "$CONTAINER" -- sh -ex <<EOF
 sed 's/^deb/deb-src/' /etc/apt/sources.list >> /etc/apt/sources.list.d/sources.list
-# wait until online
-while [ -z "\$(ip route list 0/0)" ]; do sleep 1; done
+# We might attach the console too soon
+while ! systemctl --quiet --wait is-system-running; do sleep 1; done
+# For some reason, it is necessary to run this manually or the interface won't be configured
+# Note that we avoid networkd, as some of the tests will break it later on
+dhclient
 apt-get -q --allow-releaseinfo-change update
 apt-get -y dist-upgrade
 apt-get install -y eatmydata