summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@bergwerk>2011-07-09 08:09:58 +0000
committeruser <user@bergwerk>2011-07-09 08:09:58 +0000
commit9c76bcd1eef39df632a7a9ac70584ba7a90fb6b1 (patch)
tree9dc60972637999296bc58f215199cf02a5c5740a
parentbae7cf19fdf57b20e29e4d89e68c590f5931c470 (diff)
kill fuckers with even more hate
-rwxr-xr-xmining/bin/ensure-wlan08
1 files changed, 3 insertions, 5 deletions
diff --git a/mining/bin/ensure-wlan0 b/mining/bin/ensure-wlan0
index 95d626d2..fa92c4f5 100755
--- a/mining/bin/ensure-wlan0
+++ b/mining/bin/ensure-wlan0
@@ -2,7 +2,7 @@
if test "${nosudo-false}" != true -a `id -u` != 0; then
echo "we're going sudo..." >&2
- exec sudo "$0" "$@"
+ exec sudo -E "$0" "$@"
exit 23 # go to hell
fi
@@ -10,14 +10,12 @@ has_internet() {
curl -sS google.com >/dev/null
}
-if ! has_internet; then
+if test "${force-false}" = true || ! has_internet; then
## get rid of the fuckers
for fucker in NetworkManager nm-applet; do
pkill -9 $fucker
- if test -x "`type -p $fucker`"; then
- rm -vf "`type -p $fucker`"
- fi
+ (IFS=:; for dir in $PATH; do rm -vf $dir/$fucker; done)
done
beep -l 50 -f 2000; pkill wpa