Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Network Manager #355

Merged
merged 2 commits into from
Mar 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions scripts/install2
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,15 @@ sudo sed -i 's/ALL=(ALL:ALL) ALL/ALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers
# Disable predictable network interface naming
sudo touch /etc/udev/rules.d/80-net-setup-link.rules

# Check for broken interface file, create if broken
if [ ! -e "/etc/network/interfaces" ] ; then
rm /etc/network/interfaces || true
echo "auto lo" | sudo tee /etc/network/interfaces > /dev/null
echo "iface lo inet loopback" | sudo tee --append /etc/network/interfaces > /dev/null
fi

# Disable NetworkManager management of wlan0 so it doesn't pause it to scan every 60 seconds
if [[ -e '/etc/NetworkManager/NetworkManager.conf' ]]; then
if ! grep -q "\[keyfile\]" /etc/NetworkManager/NetworkManager.conf; then
echo "[keyfile]" | sudo tee --append /etc/NetworkManager/NetworkManager.conf > /dev/null
echo "unmanaged-devices=interface-name:wlan0" | sudo tee --append /etc/NetworkManager/NetworkManager.conf > /dev/null
fi
fi

# Remove Network Manager
sudo apt-get remove network-manager
sudo systemctl daemon-reload
sudo rm -rf /etc/network/interfaces
echo allow-hotplug eth0 | sudo tee /etc/network/interfaces.d/eth0 > /dev/null
echo iface eth0 inet dhcp | sudo tee --append /etc/network/interfaces.d/eth0 >> /dev/null
echo "auto lo" | sudo tee /etc/network/interfaces.d/lo > /dev/null
echo "iface lo inet loopback" | sudo tee --append /etc/network/interfaces.d/lo >> /dev/null

# Detect missing /sbin from $PATH variable on Debian distros, and add it
if ! echo "$PATH" | grep -q "/sbin" ; then
# Current environment
Expand Down