Created
September 7, 2018 21:12
-
-
Save pocc/0f060a6867159d931692a8ce0a5060f9 to your computer and use it in GitHub Desktop.
Install network-manager-l2tp on linux distros from source (rough draft)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script will install network-manager-l2tp on linux distros from source. | |
| # Only instructions x86_64, per https://github.com/nm-l2tp/network-manager-l2tp | |
| # Untested everywhere (i.e. this is a rough draft) | |
| # Get the required files | |
| git clone https://github.com/nm-l2tp/network-manager-l2tp.git | |
| cd network-manager-l2tp | |
| git checkout 1.2.2 | |
| # On debian per https://gist.github.com/higebu/e89fc8357a5a395c64606a60fab86a24 | |
| # sudo apt-get install build-essential intltool libgtk-3-dev libsecret-1-dev | |
| # sudo apt-get -t stretch install xl2tpd ppp-dev libnm-gtk-dev libnma-dev libnm-glib-vpn-dev libnl-3-200 libnl-genl-3-200 libnl-route-3-200 | |
| # Provides the name of the distro | |
| distro=$(cat /etc/os-release | grep '^NAME' | awk -F= '{print $2}') | |
| # Build using distro-specific commands | |
| if [[ $distro == *"Ubuntu"* ]] || [[ $distro == *"Debian"* ]]; then | |
| ./configure \ | |
| --disable-static --prefix=/usr \ | |
| --sysconfdir=/etc --libdir=/usr/lib/x86_64-linux-gnu \ | |
| --libexecdir=/usr/lib/NetworkManager \ | |
| --localstatedir=/var \ | |
| --with-pppd-plugin-dir=/usr/lib/pppd/2.4.7 | |
| elif [[ $distro == *"Fedora"* ]] || [[ $distro == *"RedHat"* ]]; then | |
| ./configure \ | |
| --disable-static --prefix=/usr \ | |
| --sysconfdir=/etc --libdir=/usr/lib64 \ | |
| --localstatedir=/var \ | |
| --with-pppd-plugin-dir=/usr/lib64/pppd/2.4.7 | |
| elif [[ $distro == *"openSUSE"* ]]; then | |
| ./configure \ | |
| --disable-static --prefix=/usr \ | |
| --sysconfdir=/etc --libdir=/usr/lib64 \ | |
| --libexecdir=/usr/lib \ | |
| --localstatedir=/var \ | |
| --with-pppd-plugin-dir=/usr/lib64/pppd/2.4.7 | |
| else | |
| echo "Good things come to those who understand the network effect." | |
| make | |
| sudo make install | |
| echo "Please reboot for changes to take effect." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment