-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 15 July 2001 12:46, you ( S.Toms ) wrote:
On Sun, 15 Jul 2001, Ambrosius wrote:
Any particular reason why your not using the autofs package? This does pretty much what you are intending by mounting a share whenever you make an attempt to access it. After a certain ammount of inactivity on that share, it automatically unmounts it. Here's what I have in my autofs files:
skull@daydream:~ > ypcat -k auto.master /home auto.home -nosuid,noquota /auto auto.misc -nosuid,noquota
skull@daydream:~ > ypcat -k auto.home skull -rw,intr,nosuid,noquota wetdream:/home/skull nitz -rw,intr,nosuid,noquota wetdream:/home/nitz
skull@daydream:~ > ypcat -k auto.misc music -rw,intr,nosuid,noquota wetdream:/music public -rw,intr,nosuid,noquota wetdream:/public
I use ypcat because the files actually reside on the server and are shared with yp to the workstations. The following is what happens when I try and access nitz's home directory:
skull@daydream:/opt/moneydance > ls /home skull
skull@daydream:/opt/moneydance > ls /home/nitz ls: /home/nitz: Permission denied
skull@daydream:/opt/moneydance > ls /home nitz skull
as you can see from the first example, nitz isn't mounted because I've never accessed it, but as soon as I try, you can see that it's mounted. Your /etc/mtab file soon begins to look like the following:
skull@daydream:~ > cat /etc/mtab /dev/hda7 / reiserfs rw 0 0 proc /proc proc rw 0 0 /dev/hda5 /boot ext2 rw 0 0 devpts /dev/pts devpts rw 0 0 automount(pid270) /misc autofs rw,fd=5,pgrp=270,minproto=2,maxproto=4 0 0 automount(pid275) /net autofs rw,fd=5,pgrp=275,minproto=2,maxproto=4 0 0 automount(pid296) /home autofs rw,fd=5,pgrp=296,minproto=2,maxproto=4 0 0 automount(pid309) /auto autofs rw,fd=5,pgrp=309,minproto=2,maxproto=4 0 0 wetdream:/public /auto/public nfs rw,nosuid,noquota,intr,noquota,addr=192.168.0.11 0 0 wetdream:/home/skull /home/skull nfs rw,nosuid,noquota,intr,noquota,addr=192.168.0.11 0 0 wetdream:/music /auto/music nfs rw,nosuid,noquota,intr,noquota,addr=192.168.0.11 0 0 wetdream:/home/nitz /home/nitz nfs rw,nosuid,noquota,intr,noquota,addr=192.168.0.11 0 0
and after a few minutes (seems like about 10) of not accessing nitz's home directory you'll see the following:
skull@daydream:~ > ls /home skull
with the following no in /etc/mtab
skull@daydream:~ > cat /etc/mtab /dev/hda7 / reiserfs rw 0 0 proc /proc proc rw 0 0 /dev/hda5 /boot ext2 rw 0 0 devpts /dev/pts devpts rw 0 0 automount(pid270) /misc autofs rw,fd=5,pgrp=270,minproto=2,maxproto=4 0 0 automount(pid275) /net autofs rw,fd=5,pgrp=275,minproto=2,maxproto=4 0 0 automount(pid296) /home autofs rw,fd=5,pgrp=296,minproto=2,maxproto=4 0 0 automount(pid309) /auto autofs rw,fd=5,pgrp=309,minproto=2,maxproto=4 0 0 wetdream:/public /auto/public nfs rw,nosuid,noquota,intr,noquota,addr=192.168.0.11 0 0 wetdream:/home/skull /home/skull nfs rw,nosuid,noquota,intr,noquota,addr=192.168.0.11 0 0 wetdream:/music /auto/music nfs rw,nosuid,noquota,intr,noquota,addr=192.168.0.11 0 0
you'll notice the last entry for /home/nitz is now missing.
a> Pick one: Because I'm a moron. Becaue I didn't think about it. Because I haven't had much luck with autofs... (drake's wouldn't always unmount the resource) Still learning a loota stuff.
Thanks I'll peek a sneak into this May be a viable solution for my friend. He's a long time windoze user and frowned when I told him the mount and umount commands. ThanX Ambrosius - -- ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ??????????????????????????????? Name: Harold aka "Ambrosius" Email: ambrosius@mailandnews.com (L)ICQ Number: 117212600 Distro: SuSE Linux 7.1 Pro Registered Linux User: 216397 ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ??????????????????????????????? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE7UiOf1UIAeY3WgCcRAiwAAJ0RwsYDHyfhA00N15kH2Eic7ugIrwCeLVBQ qE6I6bscBttoFC9xbw0LgP4= =u7UB -----END PGP SIGNATURE-----