Skip to content

Commit

Permalink
Merge pull request #23 from cloudscale-ch/denis/fix-ifup-allow-boot
Browse files Browse the repository at this point in the history
Fix ifup-allow-boot.service failing to start
  • Loading branch information
href authored Jun 18, 2024
2 parents d9171a0 + 0fabe5e commit 1cc3637
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ ExecStart=/bin/sh -ec '\
for i in $(ifquery --list --exclude lo --allow boot); do INTERFACES="$INTERFACES$i "; done; \
[ -n "$INTERFACES" ] || exit 0; \
for i in $INTERFACES; do \
escaped_iface="$(systemd-escape "$i")" \
escaped_iface="$(systemd-escape "$i")"; \
logger -t ifup-allow-boot "Checking state of the $i interface" ; \
if ! ifquery --state $i > /dev/null && ! systemctl is-active iface@${escaped_iface} > /dev/null 2>&1 ; then \
if ! ifquery --state $i > /dev/null && ! systemctl is-active iface@"$escaped_iface" > /dev/null 2>&1 ; then \
logger -t ifup-allow-boot "Interface $i is down, bringing it up" ; \
systemctl start iface@${escaped_iface} ; sleep 0.5 ; \
systemctl start iface@"$escaped_iface" ; sleep 0.5 ; \
while [ -e /run/network/ifup-$i.pid ] ; do sleep 0.5 ; \
logger -t ifup-allow-boot "Waiting for $i interface" ; done ; \
logger -t ifup-allow-boot "Interface $i is up" ; \
Expand Down

0 comments on commit 1cc3637

Please sign in to comment.