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
diff --git a/bin/networkmanager b/bin/networkmanager
index 265bf7b..aa9db43 100755
--- a/bin/networkmanager
+++ b/bin/networkmanager
@@ -36,6 +36,12 @@ if [ ! -e "/etc/netplan/00-default-nm-renderer.yaml" ] ; then
36 echo "unmanaged-devices+=interface-name:eth*,interface-name:enx*" >> $SNAP_DATA/conf.d/disable-ethernet.conf36 echo "unmanaged-devices+=interface-name:eth*,interface-name:enx*" >> $SNAP_DATA/conf.d/disable-ethernet.conf
37 fi37 fi
38else38else
39 # Enable ethernet management again if the user switched the netplan
40 # backend and wants us to manage ethernet
41 if [ -e $SNAP_DATA/conf.d/disable-ethernet.conf ] ; then
42 rm -f $SNAP_DATA/conf.d/disable-ethernet.conf
43 fi
44
39 if [ ! -e "$SNAP_DATA/conf.d/no-auto-default-ethernet.conf" ] ; then45 if [ ! -e "$SNAP_DATA/conf.d/no-auto-default-ethernet.conf" ] ; then
40 # If we're running as the only network management service46 # If we're running as the only network management service
41 # and are configured via netplan on first boot then we should47 # and are configured via netplan on first boot then we should

Subscribers

People subscribed via source and target branches