
December 19th, 2003, 11:03 AM
|
|
Junior Member
|
|
Join Date: Dec 2003
Location: Arizona
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Uploading files to a server via a shell script
I am a sysadmin at a Public high school.
I have 1500 client machines that will be running OSX on DCHP, that I need to be able to track the IP of. District will give no access to the DHCP server at all.
My solution was to make a script to echo "ipconfig getifaddr <interface>", "ifconfig -ua inet" (IP4), and "ifconfig -ua ether" to a file and upload it to a web server directory.
This will be better solved in the future by a SQL database with a web front end, however SQL not being my strong point and time being an issue....
scp is not scriptable in this instance since this disk image/iso will be pushed to around 1500 machines each with a different hostname.
Apparently ncftp has somethign called ncftpput, which is entirely scriptable, and damned useful. It is available here: URL
The upload script is created by a prep machine script that tells the machine it's name, it's room location, and building location. So the info files would be located at webserver.domain/IpTracking/<Building>/<Room>/<MachineName>.txt
I hope this is useful for anyone with similar needs. At some point I'll create a web site detailing the changes.
Note: also looking for other OSX admins in education for some comparing of ideas.
|