daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Apr 12th, 2014 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. #
  3. # /etc/rc.d/net: start/stop network
  4. #
  5.  
  6. case $1 in
  7. start)
  8.         # loopback
  9.         /sbin/ip addr add 127.0.0.1/8 dev lo broadcast + scope host
  10.         /sbin/ip link set lo up
  11.         # wpa_supplicant + wlan0 connection
  12.         /usr/sbin/wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa.conf
  13.         /sbin/dhcpcd -t 10 -h $HOSTNAME wlan0
  14.         ;;
  15. stop)
  16.         /usr/bin/killall -q /sbin/dhcpcd
  17.         /usr/bin/killall -q /usr/sbin/wpa_supplicant
  18.         /sbin/ip link set lo down
  19.         /sbin/ip addr del 127.0.0.1/8 dev lo
  20.         ;;
  21. restart)
  22.         $0 stop
  23.         $0 start
  24.         ;;
  25. *)
  26.         echo "usage: $0 [start|stop|restart]"
  27.         ;;
  28. esac
  29.  
  30. # End of file
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top