Skip to content
Permalink
Browse files

Adapt for Docker

  • Loading branch information...
NEMS Linux
NEMS Linux committed Aug 18, 2019
1 parent 8bce784 commit e5694a56ba3d4bb2bd5328b5cc510ca5b630e13a
Showing with 31 additions and 16 deletions.
  1. +28 −15 build/174-networkmanager
  2. +3 −1 nems-prep.sh
@@ -1,23 +1,36 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

# Remove resolvconf
apt -y remove --purge resolvconf
platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)

# dhcpcd5 is a dependency of Raspberry Pi networking, so must remain installed, but will disable
systemctl stop dhcpcd
systemctl disable dhcpcd

# Disable networking and enable NetworkManager
systemctl enable NetworkManager
systemctl disable networking

# Use NetworkManager to manage interfaces, even if configured within /etc/network/interfaces
if grep -q "managed=false" /etc/NetworkManager/NetworkManager.conf; then
/bin/sed -i -- 's,managed=false,managed=true,g' /etc/NetworkManager/NetworkManager.conf
/etc/init.d/network-manager restart
fi
if (( $platform == 21 )); then

echo "Docker handles networking differently, so I will not be configuring NetworkManager."
if ! grep -q "PATCH-000003" /var/log/nems/patches.log; then
echo "PATCH-000003" >> /var/log/nems/patches.log
fi

else

# Remove resolvconf
apt -y remove --purge resolvconf

# dhcpcd5 is a dependency of Raspberry Pi networking, so must remain installed, but will disable
systemctl stop dhcpcd
systemctl disable dhcpcd

# Disable networking and enable NetworkManager
systemctl enable NetworkManager
systemctl disable networking

# Use NetworkManager to manage interfaces, even if configured within /etc/network/interfaces
if grep -q "managed=false" /etc/NetworkManager/NetworkManager.conf; then
/bin/sed -i -- 's,managed=false,managed=true,g' /etc/NetworkManager/NetworkManager.conf
/etc/init.d/network-manager restart
fi

if ! grep -q "PATCH-000003" /var/log/nems/patches.log; then
echo "PATCH-000003" >> /var/log/nems/patches.log
fi

fi
@@ -99,5 +99,7 @@ sleep 5

echo "System Prepped & Rebooting... re-connect as nemsadmin, run screen, then run your build script (see ./notes)."

reboot
if [[ -e /sbin/reboot ]]; then
/sbin/reboot
fi
fi

0 comments on commit e5694a5

Please sign in to comment.
You can’t perform that action at this time.