Merge ~morphis/snappy-hwe-snaps/+git/network-manager:fix-startup-for-netplan-backend-switch into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master

Proposed by Simon Fels
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 3df8285ef9cd60b5241d7a08b0b22c12527879a6
Merged at revision: ae787207d51fd33f30bd672b5250878230066303
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:fix-startup-for-netplan-backend-switch
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master
Diff against target: 17 lines (+6/-0)
1 file modified
bin/networkmanager (+6/-0)
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Approve
Review via email: mp+309446@code.launchpad.net

Description of the change

Allow people to get ethernet managed back by NetworkManager

We now check on startup if network-manager should still managed ethernet or not and adjust our configuration depending on the existence of the 00-default-nm-renderer.yaml file in /etc/netplan

To post a comment you must log in.
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/networkmanager b/bin/networkmanager
2index 265bf7b..aa9db43 100755
3--- a/bin/networkmanager
4+++ b/bin/networkmanager
5@@ -36,6 +36,12 @@ if [ ! -e "/etc/netplan/00-default-nm-renderer.yaml" ] ; then
6 echo "unmanaged-devices+=interface-name:eth*,interface-name:enx*" >> $SNAP_DATA/conf.d/disable-ethernet.conf
7 fi
8 else
9+ # Enable ethernet management again if the user switched the netplan
10+ # backend and wants us to manage ethernet
11+ if [ -e $SNAP_DATA/conf.d/disable-ethernet.conf ] ; then
12+ rm -f $SNAP_DATA/conf.d/disable-ethernet.conf
13+ fi
14+
15 if [ ! -e "$SNAP_DATA/conf.d/no-auto-default-ethernet.conf" ] ; then
16 # If we're running as the only network management service
17 # and are configured via netplan on first boot then we should

Subscribers

People subscribed via source and target branches