Skip to content

Commit

Permalink
agent(upstream): tell networkd to ignore eth0 in the alt run as well
Browse files Browse the repository at this point in the history
Follow-up to a873032.
  • Loading branch information
mrc0mmand committed Nov 9, 2023
1 parent a873032 commit 4e2611f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
10 changes: 10 additions & 0 deletions agent/bootstrap-alt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,16 @@ fi
ninja -C "$BUILD_DIR"
) 2>&1 | tee "$LOGDIR/build-$(uname -m).log"

# Tell systemd-networkd to ignore eth0 netdev, so we can keep it up during the
# systemd-networkd testsuite
cat >/etc/systemd/network/10-eth0.network <<EOF
[Match]
Name=eth0
[Link]
Unmanaged=yes
EOF

# Reboot the machine here to switch to the latest kernel if available
echo "-----------------------------"
echo "- REBOOT THE MACHINE BEFORE -"
Expand Down
20 changes: 10 additions & 10 deletions agent/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,6 @@ coredumpctl_set_ts
# Install the compiled systemd
ninja -C "$BUILD_DIR" install

# Tell systemd-networkd to ignore eth0 netdev, so we can keep it up
# during the systemd-networkd testsuite
cat >/etc/systemd/network/10-eth0.network <<EOF
[Match]
Name=eth0
[Link]
Unmanaged=yes
EOF

# FIXME: drop once https://github.com/systemd/systemd/pull/27890 lands
DRACUT_OPTS=()
[[ -x /usr/lib/systemd/systemd-executor ]] && DRACUT_OPTS+=(--install /usr/lib/systemd/systemd-executor)
Expand Down Expand Up @@ -266,6 +256,16 @@ DRACUT_OPTS=()
rm -fv "$INITRD"
) 2>&1 | tee "$LOGDIR/sanity-boot-check.log"

# Tell systemd-networkd to ignore eth0 netdev, so we can keep it up during the
# systemd-networkd testsuite
cat >/etc/systemd/network/10-eth0.network <<EOF
[Match]
Name=eth0
[Link]
Unmanaged=yes
EOF

# The new systemd binary boots, so let's issue a daemon-reexec to use it.
# This is necessary, since at least once we got into a situation where
# the old systemd binary was incompatible with the unit files on disk and
Expand Down

0 comments on commit 4e2611f

Please sign in to comment.