Skip to content

Instantly share code, notes, and snippets.

@srinivasmohan
Created September 25, 2014 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srinivasmohan/8b53d29d3856253fd589 to your computer and use it in GitHub Desktop.
Save srinivasmohan/8b53d29d3856253fd589 to your computer and use it in GitHub Desktop.
shellsock2.sh
#!/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