Re: prevent writing to unmounted directory

2008-05-10 Thread Sean Connor
Chris [EMAIL PROTECTED] writes: I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script from writing to the mount directory: is there any easy way to prevent this? Umount /mnt/music. Run chattr +i

Re: prevent writing to unmounted directory

2008-04-25 Thread Chris Roberts
On Thursday 24 Apr 2008, Chris wrote: mounted as smbfs in fstab I thought smbfs was unmaintained and that cifs was the better option - anyone? Chris. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: prevent writing to unmounted directory

2008-04-25 Thread Damon L. Chesser
Chris wrote: that seems like a nice approach. Why do I need to touch the SENTINEL file? C Chris, in the example, you touch the file ONCE to make it exist. Then when you mount music, it will mask the file. That file will only show up when your smb mount for music is not mounted.

Re: prevent writing to unmounted directory

2008-04-25 Thread Bob McGowan
Andrew Sackville-West wrote: On Thu, Apr 24, 2008 at 10:18:48PM +0200, Chris wrote: On Thursday 24 April 2008, Bob McGowan wrote: Chris wrote: Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script

Re: prevent writing to unmounted directory

2008-04-25 Thread Chris
On Friday 25 April 2008, Damon L. Chesser wrote: Chris wrote: that seems like a nice approach. Why do I need to touch the SENTINEL file? C Chris, in the example, you touch the file ONCE to make it exist. Then when you mount music, it will mask the file. That file will only show up

prevent writing to unmounted directory

2008-04-24 Thread Chris
Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script from writing to the mount directory: is there any easy way to prevent this? Thanks, C -- C. Hurschler -- To UNSUBSCRIBE, email to [EMAIL

Re: prevent writing to unmounted directory

2008-04-24 Thread Damon L. Chesser
Chris wrote: Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script from writing to the mount directory: is there any easy way to prevent this? Thanks, C How are you accessing the NAS?

Re: prevent writing to unmounted directory

2008-04-24 Thread Bob McGowan
Chris wrote: Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script from writing to the mount directory: is there any easy way to prevent this? Thanks, C if [ -f /mnt/music/somefile ] then

Re: prevent writing to unmounted directory

2008-04-24 Thread Chris
On Thursday 24 April 2008, Damon L. Chesser wrote: Chris wrote: Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script from writing to the mount directory: is there any easy way to prevent

Re: prevent writing to unmounted directory

2008-04-24 Thread Chris
On Thursday 24 April 2008, Bob McGowan wrote: Chris wrote: Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script from writing to the mount directory: is there any easy way to prevent this?

Re: prevent writing to unmounted directory

2008-04-24 Thread Mr Smiley
Touch a file on the NAS share with a name such as NAS.HERE, and in your script check that that file exists. If it exists, then it's mounted, if not, then it's not mounted. Ken --- Chris [EMAIL PROTECTED] wrote: On Thursday 24 April 2008, Damon L. Chesser wrote: Chris wrote: Hello,

Re: prevent writing to unmounted directory

2008-04-24 Thread Andrew Sackville-West
On Thu, Apr 24, 2008 at 10:18:48PM +0200, Chris wrote: On Thursday 24 April 2008, Bob McGowan wrote: Chris wrote: Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not running, and I want to prevent the script from writing to

Re: prevent writing to unmounted directory

2008-04-24 Thread Chris
On Friday 25 April 2008, Andrew Sackville-West wrote: On Thu, Apr 24, 2008 at 10:18:48PM +0200, Chris wrote: On Thursday 24 April 2008, Bob McGowan wrote: Chris wrote: Hello, I want to run a script to rsync local files to a NAS mounted to /mnt/music. Sometimes the NAS is not