Skip to content

Commit

Permalink
Merge pull request #758 from aivanise/main
Browse files Browse the repository at this point in the history
systemd: Don't bring network down when using routed networking
  • Loading branch information
stgraber authored Aug 3, 2023
2 parents 7e61e2e + 97d4e76 commit 8f87993
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distrobuilder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ Description=Turn off network device
Before=NetworkManager.service
Before=systemd-networkd.service
[Service]
# do not turn off if there is a default route to 169.254.0.1, i.e. the device is a routed nic
ExecCondition=/bin/sh -c '! /usr/bin/grep -qs 00000000.0100FEA9 /proc/net/route'
ExecStart=-${ip_path} link set $1 down
Type=oneshot
RemainAfterExit=true
Expand Down

0 comments on commit 8f87993

Please sign in to comment.