~ubuntu-branches/debian/sid/acx100/sid

« back to all changes in this revision

Viewing changes to scripts/stop_net

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Gea Milvaques
  • Date: 2005-04-13 23:36:11 UTC
  • Revision ID: james.westby@ubuntu.com-20050413233611-5ec8mnua3b9k3t4u
Tags: upstream-0.2.0pre8+52
ImportĀ upstreamĀ versionĀ 0.2.0pre8+52

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
DEV=wlan0
 
3
 
 
4
if test "$UID" != "0"; then echo "You are not root. To insert the module into your kernel, you need to be root. Enter su and try again. Bailing..."; exit 1; fi
 
5
 
 
6
IFCONF=`which ifconfig`
 
7
RMMOD=`which rmmod`
 
8
 
 
9
if test -z "$IFCONF"; then echo "Can't deconfigure interface, and likely not
 
10
unload module."; else $IFCONF $DEV down; fi
 
11
 
 
12
sleep 1
 
13
if test -z "$RMMOD"; then echo "rmmod not found. Go get a sane Linux system. Bailing..."; exit 1; fi 
 
14
$RMMOD acx_pci
 
15
if test "$?" = "0"; then echo "$DEV deconfigured, module unloaded."; else echo "Module not unloaded, or wasn't loaded."; fi
 
16