Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #----Line #10 of http://www.pearltrees.com/s243a/simple-network-setup-usr-local/id14851906
- #100325 added 'stop' commandline option. added DHCPCDFIX for wired.
- #----Lines #42 to #59 of http://www.pearltrees.com/s243a/simple-network-setup-usr-local/id14851906
- if [ $1 ];then #100325
- case $1 in
- stop)
- if [ -f /tmp/sns_interface_success ];then
- INTERFACE="`cat /tmp/sns_interface_success`"
- rm -f /tmp/sns_interface_success
- [ "`pidof wpa_supplicant`" != "" ] && wpa_cli terminate #kill wpa_supplicant.
- ifconfig $INTERFACE down
- [ "`iwconfig $INTERFACE | grep "$INTERFACE" | grep "ESSID"`" != "" ] && iwconfig $INTERFACE essid off
- dhcpcd --release $INTERFACE 2>/dev/null
- ip route flush dev $INTERFACE #100703
- #in situation bring down interface from desktop icon...
- [ "$DISPLAY" ] && LANG=$LANGORIG yaf-splash -placement bottom -bg pink -timeout 5 -text "$(gettext 'Network interface') ${INTERFACE} $(gettext 'has been disabled')" &
- fi
- exit
- ;;
- esac
- fi
Advertisement
Add Comment
Please, Sign In to add comment