Created
September 27, 2014 03:18
-
-
Save cheeseplus/93e98dfe14254882dd9f to your computer and use it in GitHub Desktop.
vcair linux customization script
This file contains 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/sh | |
if test -f "/etc/lsb-release" && grep -q DISTRIB_ID /etc/lsb-release; then | |
platform=`grep DISTRIB_ID /etc/lsb-release | cut -d "=" -f 2 | tr '[A-Z]' '[a-z]'` | |
platform_version=`grep DISTRIB_RELEASE /etc/lsb-release | cut -d "=" -f 2` | |
elif test -f "/etc/debian_version"; then | |
platform="debian" | |
platform_version=`cat /etc/debian_version` | |
elif test -f "/etc/redhat-release"; then | |
platform=`sed 's/^\(.\+\) release.*/\1/' /etc/redhat-release | tr '[A-Z]' '[a-z]'` | |
platform_version=`sed 's/^.\+ release \([.0-9]\+\).*/\1/' /etc/redhat-release` | |
fi | |
if test "$platform" = "ubuntu"; then | |
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config | |
fi | |
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" >> /etc/resolv.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment