Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

subzero

macrumors newbie
Original poster
Nov 2, 2005
24
0
Denmark
Hello MacRumours-users,

I have recently switched to a PowerBook with Mac OSX Tiger. I am using this portable both at home and as well at school and work.

All of these locations have different smbd-shares. I would very much like to be able to run an application on location-switch, that would mount the appropriate shares on my portable.

The application I would like to execute is AutomountMaker, which can be set to run on user-logon.

Is it possible to run this application on location-switch?
- I imagine that I would need some AppleScript to retrieve the current location and load the associated AutomountMaker-script.
 

varmit

macrumors 68000
Aug 5, 2003
1,830
0
subzero said:
Hello MacRumours-users,

I have recently switched to a PowerBook with Mac OSX Tiger. I am using this portable both at home and as well at school and work.

All of these locations have different smbd-shares. I would very much like to be able to run an application on location-switch, that would mount the appropriate shares on my portable.

The application I would like to execute is AutomountMaker, which can be set to run on user-logon.

Is it possible to run this application on location-switch?
- I imagine that I would need some AppleScript to retrieve the current location and load the associated AutomountMaker-script.
The only way to automate this process is to mount the Share and save the username and password to the Keychain, open System Preferences, Accounts, click on the Login Item, drag and drop the mounted share to this area. Then on boot up it should mount the drive automatically. Do it for all shares at all he different locations, and it should hopefully mount the drives on boot up for that particular location. Note, you will need to boot from scratch to get this way to work. Not just sleep the computer and open it up at the new location and have the drives auto mounted for you. Otherwise, its a manual run the script when you get to said location. Also, you might lock up the Finder with the way I told you, because I have never done it at multiple locations and mounting multiple drives, but hopefully it just skips the ones it can't find.
 

subzero

macrumors newbie
Original poster
Nov 2, 2005
24
0
Denmark
I have already created multiple AppleScripts to mount the different shares.

I guess there is no way to execute these scripts on login (e.g. from sleep - my PB is never turned off).

I might just script a bash-script and run it like every 5th. minute from crontab and check if the mounted volumes are correct according to the current location.
With that solution I would still need to be able to find the selected network location from within a terminal - would you perhaps know how to do that?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.