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/bash | |
if [[ "$1" == eth* ]]; then | |
echo "this part will be executed right after an interface is up." | |
# find out the ip | |
IP=$( ifconfig | grep "inet " | head -n 1 | awk '{print $2}' | awk 'BEGIN {FS = ":"} ; {print $2}' ) | |
# delete the existing lines in the file | |
FQDN=`hostname` | |
HOSTNAME=`hostname -s` | |
sed -i "/${HOSTNAME}/d" /etc/hosts |
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/bash | |
set -e | |
wget http://archive.apache.org/dist/thrift/0.8.0/thrift-0.8.0.tar.gz | |
tar zxf thrift-0.8.0.tar.gz | |
pushd thrift-0.8.0 | |
wget https://issues.apache.org/jira/secure/attachment/12511532/thrift-1465_1.patch | |
patch -p0 < thrift-1465_1.patch | |
wget https://issues.apache.org/jira/secure/attachment/12537024/THRIFT-1474-read-exceptions-first.patch |