speeding_ant Posted May 25, 2011 Author Share Posted May 25, 2011 That wasn't a dig at you, just a generic joke. Take a breather and start systematically diagnosing. I've given you a lot of pointers, mostly just common sense. Don't get pissy, we're just trying to help. Quote Link to comment
defected07 Posted May 25, 2011 Share Posted May 25, 2011 I know, this week has been hell and I have a shit ton of outside work to do as well, so I'm sorry--not getting mad at your, just this whole situation not working out. I go through the logs, posted what I can. I'll create a VMWare image of OS X I guess--but it may be quicker to just re-install unRAID 5.0 TBH. Quote Link to comment
speeding_ant Posted May 25, 2011 Author Share Posted May 25, 2011 For sure! Leave it until the weekend, focus on work Quote Link to comment
defected07 Posted May 29, 2011 Share Posted May 29, 2011 Still confused. Seems I was able to get at least Media to mount as RW now. But the ping within the script still returns 0 packets when executed via the launchctl. When I run on the command line as myself: ping -q -c 1 tower It sends 1 packet, and returns 1 packet--so, success When I run the script, mount.sh, on the command line: ./mount.sh PING 192.168.1.73 (192.168.1.73): 56 data bytes --- 192.168.1.73 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.295/0.295/0.295/0.000 ms Mounting Backup Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file... file -C -m magicfiles Try `file --help' for more information. Mounting Media Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file... file -C -m magicfiles Try `file --help' for more information. I don't know anywhere in the script that calls the 'file' command. It still mounts the drives ok. I just don't understand why it doesn't work through the .plist ? Quote Link to comment
speeding_ant Posted May 29, 2011 Author Share Posted May 29, 2011 Just did a search for "file" in my script. The last change I did must have been in TextEdit, seems spellcheck changed fi to file !! However, this does not break the script so launchd will still run it. Your ping issue is very strange... Perhaps try changing the ping attempts to 5-10? I'll change the script download soon. In the meantime, please remove "File" from your script, and then attach a copy of your script here, with everything but passwords in place. Cheers! Quote Link to comment
defected07 Posted May 29, 2011 Share Posted May 29, 2011 Yeah, I think the 'file' was meant to close the 'elif' (since you put the conditional statement backwards to close it -- if -> fi, else -> esle) But there really just needed to be the one 'fi' to close the whole block. So there is also an extra 'fi' after you correct the 'file' statement--I just commented it out. Attached is my file with my passwords removed. Thanks for your help! mount.sh.txt Quote Link to comment
speeding_ant Posted May 29, 2011 Author Share Posted May 29, 2011 Correct! Cheers for looking into that Quote Link to comment
speeding_ant Posted May 29, 2011 Author Share Posted May 29, 2011 OK so took a look at the script. Very strange, honestly not sure why it's not working via LaunchD. What I'd recommend is rebuilding that plist via an app called "Lingon" to suit your setup. Unless there's something funny with your network and it happens to only drop packets while you try it via Launchd (yeah right), then I can only suggest to try on another Mac to see if that's where the problem lies. Also, try different settings on the Ping command, and echo some debugging text to see where the problem might be lying. You can see most logging activity in the Console. You can add this for displaying text only in console. Either pipe in results, or add text inside quotes after the command: logger -p local0.notice Sorry I can't be of too much help here. In most cases you'd be more knowledgeable on the script side of things, so that's as far as I can go there. Quote Link to comment
defected07 Posted May 29, 2011 Share Posted May 29, 2011 Thanks for your help. What are some other ping commands I could try? Unfortunately, I only have one Mac, so I can't try that. I will try assigning the onboard NIC back to eth0, and see if LaunchD works with the original NIC. Thanks P.S. Know anywhere to get Lingon for free? Lol, my usual spot doesn't have it--or do you know a freeware app that does the same thing? I could try running the script every minute via crontab Quote Link to comment
speeding_ant Posted May 29, 2011 Author Share Posted May 29, 2011 PM me your email and I'll email you the free version of Lingon. Edit the ping command to just "ping" without additional options. This will make it more verbose in the logs. Cheers Quote Link to comment
smino Posted June 17, 2011 Share Posted June 17, 2011 Wow, Great work you guys. I am going to have to try this, as I get annoyed of the findered boxes opening up at login. So do you have a step by step guide written, or an "official" script release? I noticed so many different versions throughout the thread. Quote Link to comment
defected07 Posted June 17, 2011 Share Posted June 17, 2011 FYI speeding_ant. Is it possible to add the config options (like username, password, IP address) to the .plist file? I feel that may just make everything a bit easier, and less prone for error...if you passed arguments to the script from the launchd plist, instead of editing the script--but that's just me trying to make things more difficult I guess Quote Link to comment
speeding_ant Posted June 17, 2011 Author Share Posted June 17, 2011 Hey Defected - Naw I'm going to leave as it! It seems to work in its current state, and I've got other projects on now! In terms of installation, the instructions on the first page are the "official" instructions. If you get stuck anywhere let me know and I'll amend them to make it easier to follow. Cheers Quote Link to comment
squirrellydw Posted July 2, 2011 Share Posted July 2, 2011 Ok, so without reading 8 pages what script should I use for my mac mini running plex with AFP? Also what are the latest install instructions? Thanks Quote Link to comment
defected07 Posted July 2, 2011 Share Posted July 2, 2011 Just read the first post. Quote Link to comment
squirrellydw Posted July 2, 2011 Share Posted July 2, 2011 Thanks, will try this later today Quote Link to comment
squirrellydw Posted July 7, 2011 Share Posted July 7, 2011 seems to be working, thanks Quote Link to comment
squirrellydw Posted July 14, 2011 Share Posted July 14, 2011 Does this affect spin down of the drives at all? Quote Link to comment
speeding_ant Posted July 14, 2011 Author Share Posted July 14, 2011 Shouldn't do at all. It only checks the server once. If the Volumes are mounted, it checks the local computer first before the server. There have been multiple issues with Spin-down in recent unRAID versions. The latest unRAID beta has fixed all my spin-down issues. Quote Link to comment
mrklaw Posted August 7, 2011 Share Posted August 7, 2011 you tried this in Lion? It seems to be mounting my drives ok (and quietly without big windows popping up), but it isn't starting up iTunes. edit: launching iTunes now after a couple of restarts Quote Link to comment
cbr600ds2 Posted August 7, 2011 Share Posted August 7, 2011 Nice stuff. I may be picking your guys' brains later when I install my server for tips/pointers seeing as how I'm a recent Mac convert i'm still getting used to the mac stuff. Quote Link to comment
speeding_ant Posted August 7, 2011 Author Share Posted August 7, 2011 Modified script to fix iTunes launch issue in Lion. Quote Link to comment
squirrellydw Posted August 12, 2011 Share Posted August 12, 2011 Is this still needed for beta 10? Ever since I installed this my drives don't spin down. Quote Link to comment
speeding_ant Posted August 12, 2011 Author Share Posted August 12, 2011 Is what still needed? This script will not keep your drives spun up. Will only spin them up mounting them onto your computer for the first time, then the drives are free to sleep. Quote Link to comment
erikm101 Posted September 17, 2011 Share Posted September 17, 2011 Hello speeding_ant. This is a great script and it is working well for me, with one small exception. I am running Lion with multiple users, and using fast user switching. I need for all of my users to have access to the shares once they are mounted and prefer that they all access the same mount point. My goal is to have a single user account setup the auto mount shares at login and for all other users to have access to it (775). Obviously, none would have access until the primary user logged in and auto mounted the shares. The permissions for any shares created by this script is 700, and I can't seem to change it. Any thoughts on how I could accomplish this? My config on the script posted below. TIA for any help you can provide. erik #-----------------------------# # Required for share mounting # #-----------------------------# # Script Location SCRIPTLOCATION="/scripts" # Username for server USERNAME="****" # Password for server, check notes PASSWORD="****" # IP Address/hostname for ping PING="10.0.1.201" # Hostname for server. Try sername.local, hostname or IP HOSTNAME="Tower" # Protocol in lowercase, afp or smb PROTOCOL="afp" # Shares, check notes SHARES="shared Videos" Output of ls -l on /Volumes iMac:Volumes Erik$ ls -l total 8 lrwxr-xr-x 1 root admin 1 Sep 17 15:28 Macintosh HD -> / drwx------@ 7 Erik staff 264 Sep 17 15:30 Videos drwx------@ 9 Erik staff 264 Sep 17 15:30 shared Also notice that in the Get Info window, owner is shown as 'unknown', see attached screenshot. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.