Needs to be restarted eh?

aarontrip

Registered
First off I have an internet connection that kicks me off a lot, and in the previous Mac OS' what I would do to get connected again quick without having to restart is go to the TCP/IP control panel, switch the settings, save the changes, go back to TCP/IP control panel and change back to the correct settings, save that, then I would be connected again.

With Mac OSX if I want to switch my TCP/IP settings it reqires a restart... when you get disconected as much as I do that gets very annoying... any suggestions on a quick way to get my connection back? thanks
 
This fixed was posted a week ago or so on mosr.com:

Timothy Hatcher sent in this UNIX shell script that will restart the various networking daemons without a full-blown system reboot, allowing the user to reconfigure network settings without restarting OS X.

To make use of this script, make sure you are logged into OS X as Administrator/root. Open the Terminal application, and type "pico net-restart.sh" (without the quotes, of course). This will open Pico, a command-line text editor. Then, copy the script below and paste it into the terminal. Now hit Ctrl-X to exit Pico, and when prompted to "Save modified buffer?", hit return twice to save the file to disk. You will now be back at the UNIX command line; type "chmod 555 net-restart.sh" to set the file's permissions to allow it to be executed as a script.

Now make any changes you'd like to the Network control panel, and head back to the Terminal. Type "./net-restart.sh", and the script should run without incident:

Script starts below this line.

#!/bin/sh
case `whoami` in
root)
;;
*)
echo "Not Administrator (root). You need to be in order to restart the network."
return
;;
esac
echo "Restarting the network, network will be unavailable."
kill `ps aux | grep ipconfigd | grep -v grep | awk '{print $2}'`
echo " - Killed 'ipconfigd'."
ipconfigd
echo " - Started 'ipconfigd' right back up."
sleep 1
ipconfig waitall
echo " - Ran 'ipconfig waitall' to re-configure for new settings."
sleep 1
kill -HUP `cat /var/run/nibindd.pid`
echo " - Killed 'nibindd' with a HUP (hang up)."
sleep 2
kill -HUP `cat /var/run/lookupd.pid`
echo " - Killed 'lookupd' with a HUP (hang up)."
echo "The network has successfully been restarted and/or re-configured and is now available."

Script stops right before this line

HTH,
F-bacher
 
Back
Top