|
#1
| ||||
| ||||
| Run certain command on boot up?
I want my system (10.6.x) to run something like `/sbin/ifconfig lo0 alias 127.0.0.2` at start up. I notice that I can possibly put that command into /etc/rc.common, but there are not rc.local or something similar to that which can be found on an usual BSD system... and /etc/rc.common is already populated with a bunch of stuff, so I am wondering if there is a recommended way to do this? Full story: I am actually accessing my remote drive on a Samba server, and I like to do this over SSH since I would always leave the SSH port open and I like to use that instead of having another service and port open for Samba. So every time I want to access Samba I SSH into my remote machine, with the option `-L 127.0.0.2:4445:127.0.0.1:445`, on my Mac I just open Finder and connect to smb://127.0.0.2:4445. I need SSH to listen on 127.0.0.2 on my Mac instead of 127.0.0.1 because Finder is actually smart enough to see and tell you that 127.0.0.1 is the local machine anyway, that it actually tell you to just to grab the file locally. Unfortunately Finder is not smart enough to realise the possibility of the traffic being tunnel through SSH to a remote server. So listening on 127.0.0.2 (an alias on lo0) is a workaround... but if there is a better way to do this, that would be good too. Thanks!!
__________________ Core 2 Duo 2.4Ghz, OSX 6.1 Opteron 2.6Ghz, OpenBSD 4.6 Last edited by Sunnz; October 21st, 2009 at 03:00 AM. |
|
#2
| ||||
| ||||
|
__________________ Mac mini 2.0GHz 10.6.2 • 4GB • 320GB • Superdrive • 4 x 1TB USB 2.0 • LED Cinema Display MacBook 2.0GHz Core 2 Duo - White 10.6.2 • 4GB • 250GB • CD-RW/DVD-ROM iPhone 3G 8GB • iPod Touch 8GB • iPod Photo 60GB • iPod nano 1GB • AT&T U-Verse 18Mb/2Mb http://www.jeffhoppe.com |
![]() |
| Bookmarks |
| Thread Tools | |
|
|