Created
September 25, 2014 22:52
-
-
Save srinivasmohan/8b53d29d3856253fd589 to your computer and use it in GitHub Desktop.
shellsock2.sh
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/dash | |
export DEBDIR="/tmp/bashdebs" | |
[ -d $DEBDIR ] && rm -fr $DEBDIR | |
rm -f /tmp/bashdebs.tgz | |
cd /tmp/ && wget --quiet http://s3.amazonaws.com/com.versal.sysops/shellsock/bashdebs.tgz && tar zxvf bashdebs.tgz | |
cd $DEBDIR && sudo /usr/bin/dpkg -i *.deb 2>&1 1>/dev/null | |
#Test after update | |
bashver=`/usr/bin/dpkg -l bash | tail -1 | awk '{print $3}'` | |
echo "Host `hostname`, post update, with Bash $bashver" | |
rm -f echo && env -i X='() { (a)=>\' bash -c 'echo id'; cat echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment