Public feed #724464

dragon_788

public text v1 · immutable
Raw Edit
·published 2007-10-03 16:47 UTC
rendered paste body
#!/bin/sh

### Configuration ###
iwconfig=/sbin/iwconfig
wired=eth0
wireless=wlan0
tmp=/tmp
### Configuration ###

### Script Start ### 
if [[ "$($iwconfig $wireless | grep -o 'Not-Associated')" == "" ]]; then
	if [ -f $tmp/net.$wired ]; then
		rm $tmp/net.$wired
	fi
	touch $tmp/net.$wireless
else
	if [ -f $tmp/net.$wireless ]; then
		rm $tmp/net.$wireless
	fi
	touch $tmp/net.$wired
fi