Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Script problem




From: Jeff Ochsner [mailto:email@hidden]
Sent: Friday, July 21, 2006 12:13 PM
To: Allen, Dedrick
Cc: email@hidden
Subject: Re: Script problem

I would add this to the second line of your script, and then try logging in again.  Then, hop into /tmp and open the out file to see where it is failing.

set -xv; exec 1>>/tmp/out 2>&1

Jeff

On Jul 21, 2006, at 9:02 AM, Allen, Dedrick wrote:

I have a login script that automatically mounts a volume and copies down a couple of files to the local HD. When the script runs it is mounting the afp volume fine but absolutely refuses to copy the files to the machine. Here is the piece of the script.

mkdir -p /Library/Scripts/Custom
mkdir /Volumes/Software\ Update\ Scripts       
mount_afp afp://xs.intranet.com/Software\ Update\ Scripts /Volumes/Software\ Update\ Scripts
cp /Volumes/Software\ Update\ Scripts/softwareupdate.sh /Library/Scripts/Custom/
chmod u+x /Library/Scripts/Custom/softwareupdate.sh    
cp /Volumes/Software\ Update\ Scripts/com.intranet.softwareupdate.plist /Library/LaunchDaemons/
umount -f /Volumes/Software\ Update\ Scripts


I don’t see any reason why this copy doesn’t work during logon. I took the same code and pasted into a shell session and it worked fine. Just refuses to work as a login script. Anybody seen this?


Thank you for your time


Dedrick

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 
Jeff, thanks for the tip. I did this and it revealed that there was a permissions problem copying the file. I am specifying a username and password that has full access to this volume but for some reason after I mount the volume I cant access it when doing this in a login script. If I use the same shell commands from a terminal session it all works fine. I did a little more debugging and had it ls the files in the volume to a file and nothing is in the file meaning it seems that it doesnt have access to see any of these files. but again the user i am mounting with has full access to this volume.
 
 
Dedrick
 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/client-management/email@hidden

This email sent to email@hidden

References: 
 >Re: Script problem (From: Jeff Ochsner <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.