Skip to content

Commit

Permalink
enable network manager
Browse files Browse the repository at this point in the history
  • Loading branch information
kirankn8 committed Nov 23, 2023
1 parent 8bb8fd4 commit f9c1394
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,19 @@ base-image:

RUN apt update && \
apt install --no-install-recommends zstd vim network-manager -y

COPY networkmanager/manage-all.conf /etc/NetworkManager/conf.d/manage-all.conf
COPY networkmanager/NetworkManager.conf /etc/NetworkManager/NetworkManager.conf

# RUN systemctl disable systemd-networkd.service
# RUN systemctl mask systemd-networkd.service
# RUN systemctl stop systemd-networkd.service
RUN systemctl unmask NetworkManager
RUN systemctl enable NetworkManager

RUN ln -f -s /lib/systemd/system/NetworkManager.service /etc/systemd/system/multi-user.target.wants/NetworkManager.service
RUN ln -f -s /lib/systemd/system/NetworkManager-dispatcher.service /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
RUN ln -f -s /lib/systemd/system/NetworkManager-wait-online.service /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service

IF [ "$UPDATE_KERNEL" = "false" ]
RUN if dpkg -l linux-image-generic-hwe-20.04 > /dev/null; then apt-mark hold linux-image-generic-hwe-20.04; fi && \
Expand Down Expand Up @@ -286,6 +297,8 @@ base-image:
RUN zypper install -y zstd vim NetworkManager NetworkManager-tui

COPY networkmanager/manage-all.conf /etc/NetworkManager/conf.d/manage-all.conf
COPY networkmanager/NetworkManager.conf /etc/NetworkManager/NetworkManager.conf
RUN chmod 444 /usr/local/NetworkManager/custom-network-config

# removing default wicked manager since NetworkManager is used instead
RUN zypper rm wicked wicked-service
Expand Down
14 changes: 14 additions & 0 deletions networkmanager/NetworkManager.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

[main]
plugins=keyfile

[keyfile]
path=/usr/local/NetworkManager/custom-network-config

0 comments on commit f9c1394

Please sign in to comment.