Skip to content
Snippets Groups Projects
Verified Commit 3990314f authored by David Beniamine's avatar David Beniamine
Browse files

Fix network in a separate script

parent 69ffb9e3
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Fix ethernet issues
echo "# The primary eth0 interface" | sudo tee --append /etc/network/interfaces
echo "auto eth0" | sudo tee --append /etc/network/interfaces
echo "allow-hotplug eth0" | sudo tee --append /etc/network/interfaces
echo "iface eth0 inet dhcp" | sudo tee --append /etc/network/interfaces
sudo sed -i 's/^\(GRUB_CMDLINE_LINUX_DEFAULT="quiet\)"/\1 pcie_aspm=off"/' /etc/default/grub
sudo update-grub
......@@ -20,6 +20,7 @@ while [ -z "$SRV_NAME" ]
do
read -p "Merci d'entrer le code RNE de l'école (ex: DSIT or 0382693W)" SRV_NAME
done
DIR=`dirname $0`
# Prepare LDAP config
for f in dist/*
do
......@@ -30,14 +31,8 @@ do
sudo sed -i.orig "s/DSIT/$SRV_NAME/g" ${f/dist/}
done
# Fix ethernet issues
echo "# The primary eth0 interface" | sudo tee --append /etc/network/interfaces
echo "auto eth0" | sudo tee --append /etc/network/interfaces
echo "allow-hotplug eth0" | sudo tee --append /etc/network/interfaces
echo "iface eth0 inet dhcp" | sudo tee --append /etc/network/interfaces
sudo sed -i 's/^\(GRUB_CMDLINE_LINUX_DEFAULT="quiet\)"/\1 pcie_aspm=off"/' /etc/default/grub
sudo update-grub
$DIR/fix_network.sh
# Add proxy for administrateur
for proto in http https ftp
do
......@@ -46,4 +41,5 @@ do
done
sudo apt-get -y purge xpdf
sudo apt-get -y install evince
read -p "Configuration faite, appuyez sur n'importe quelle touche pour continuer"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment