After much taking, I'm happy to be able to give something to the community!
This relates to a previous hint
, where some Macintoshes do not auto-negotiate properly with the networking hardware. The current solution is to run a terminal command, sudo ifconfig en0 media 100basetX mediaopt full-duplex
, which then correctly sets the media type and speed (in my case, 100basetX and full-duplex). Unfortunately for some of us, these settings don't 'stick' after a restart (the adapter goes back to autoselect), and must be re-set manually each time.
What is needed here is a process that does this type of thing for us on startup, even before reaching the login screen. This is accomplished by creating a StartupItem, and putting it in /Library -> StartupItems. StartupItem is really a folder containing two parts: A shell script of the same name as the folder, and an XML file called StartupParameters.plist.
Create a folder called setDuplex
in /Library -> StartupItems, and create a file inside with the same name. The file should contain the following text:
# forces 100baseTX and full-duplex
ifconfig en0 media 100basetX mediaopt full-duplex
Make it executable by typing chmod a+x setDuplex
. Note that you do not
need a sudo command in the script, because it is already being run as root.
Next, create another file called StartupParameters.plist
, containing the following text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
Restart, then type ifconfig -a
in the Terminal, and your en0
interface should no longer say autoselect, and should have the correct settings.
Forgive me if there are any errors, etc - this is my first shell script, and first XML file! I believe everything should be ok, though! It works well on my server.