Bolog number 895 - Page 1 of 1

fixtehinternets

Friday, July 23 2010 02:58 UTC
Trackback URL: http://www.fatsquirrel.org/bologs/veghead/trackback.php/895

My wife's laptop runs Debian, and it's pretty stable. But there is one issue that is proving to be a real pain: the wireless adapter - an Intel job - occasionally detatches itself from the AP for no apparent reason. Obviously this is not a good scenario and something I had to address; I hate getting support calls from home.
My "solution" was to write a little script for her that fixes the problem by taking the interface down and bringing it up again. Now all she has to do is type "fixtehinternets" and it'll come back up.
Earlier today I was telling my work colleagues about this little hack, and their reaction was totally unexpected; they wanted a copy for their wives! Mr K even suggested I publish the script for the benefit of the google. So, with the caveat that it's a piece of crap, here is the valuable code:
#!/bin/sh
echo "O HAI! I CAN HAS UR PASSWORDZ ?"
echo "AHM IN UR WIREZ, FIXING UR INTERNETS"
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid "myssid"
sleep 2
sudo route add default gw 192.168.x.x
ping 158.x.x.x -c 1 >/dev/null 2>&1
[ $? -eq 0 ] && echo "YAY U HAVE ALL TEH INTERNETS!!!" || echo "O NOES! IT ARE BROKE STILL"
echo KTHXBYE

Now, you'll either not understand a word of that, or you'll recognise it as the quality piece of genius that it is.
Use it wisely, and not for evil.
Current sounds: Plump DJs/Fatboy/Chemical Brothers
Tags:          


 
About
My shoe is off.
My foot is cold.
I have a bird I liked to hold.
xml feed Subscribe with Bloglines LJ [Valid Atom 1.0] anarchist faq Valid XHTML get tor powered by Freebsd All Browsers UNIX + vi Get Firefox and go to heaven The Gimp your mum Blogs what I like See blogs and businesses for USA


Archives
This pointless blog has been in existence since 2002. Some of the early material has been maturing for quite a while, yet it still remains very immature. Feel free to sample some of the aged wares.



Links

House of Mysterious Secrets: Spooky Stuff

 
xml feed Subscribe with Bloglines LJ [Valid Atom 1.0] anarchist faq Valid XHTML get tor powered by Freebsd All Browsers UNIX + vi Get Firefox and go to heaven The Gimp your mum Blogs what I like See blogs and businesses for USA