This is a discussion on 9.1 and autofs within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hello, Is there anyone here who managed to get it up and running to tell me what I'm doing ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, Is there anyone here who managed to get it up and running to tell me what I'm doing wrong? I have support for autofs in the kernel and the autofs package installed. There seems to be no /etc/rc.d/rc.autofs however, I managed to find a rc.autofs script by David Cantrell but it dates back to 2000 and doesn't seem to work. I want to automount my sony digital camera and have setup the following ### Begin /etc/auto.master ### /misc /etc/auto.misc ### End /etc/auto.master ### ### Begin /etc/auto.misc ### sony -fstype=vfat,sync,nodev,suid :/dev/sda1 ### End /etc/auto.misc ### ### Begin added to /etc/rc.d/rc.local ### # Start autofs daemon (make rc.autofs chmod 755!!) if [ -x /etc/rc.d/rc.autofs ]; then . /etc/rc.d/rc.autofs start fi ### End added to /etc/rc.d/rc.local ### All I need is a working rc.autofs script. The good thing is that mounting it by hand does work root@darkstar:~# mount -t vfat /dev/sda1 /mnt/sony root@darkstart:# and I have access to my camera. Thank you. Regards, Johan V. |
| |||
| Johan wrote: > All I need is a working rc.autofs script. well, you posted everything except (a link to) the rc.autofs script that you claim doesn't work. where can we find it, so we can take a look? -- Joost Kremers since when is vi an editor? a discussion on vi belongs in comp.tools.unusable or something... ;-) |
| |||
| On Thu, 06 Nov 2003 11:04:44 +0000, Joost Kremers wrote: > Johan wrote: >> All I need is a working rc.autofs script. > > well, you posted everything except (a link to) the rc.autofs script that > you claim doesn't work. where can we find it, so we can take a look? I'm sorry, forgot to include it, I originally got it off google groups (http://www.mail-archive.com/autofs@l.../msg02591.html) ### Begin /etc/rc.d/rc.autofs ### #!/bin/sh # # rc.autofs - Starts the filesystem automounter # Last modified 12-Dec-2000 by David Cantrell, <[EMAIL PROTECTED]> # # # This function will build a list of automount commands to execute in # order to activate all the mount points. It is used to figure out # the difference of automount points in case of a reload # function getmounts() { # Check for local maps to be loaded if [ -f /etc/auto.master ] then cat /etc/auto.master | sed -e '/^#/d' -e '/^$/d'| ( while read dir map options do if [ ! -z "$dir" -a ! -z "$map" \ -a xcho "$map" | cut -c1 != 'x-' ] then map=cho "/etc/$map"|sed -e 's:^/etc//:/:'options=cho "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g' if [ ! -d $dir ] then mkdir -p $dir fi if [ -x $map ] then echo "/usr/sbin/automount $dir program $map $options $localoptions" elif [ -f $map ] then echo "/usr/sbin/automount $dir file $map $options $localoptions" else echo "/usr/sbin/automount $dir ^Basename $map $options $localoptions" fi fi done ) fi # Check for NIS maps to be loaded if [ -e /usr/bin/ypcat ] && [ -pcat -k auto.master 2>/dev/null | wc -l -gt 0 ] then ypcat -k auto.master | ( while read dir map options do if [ ! -z "$dir" -a ! -z "$map" \ -a xcho "$map" | cut -c1 != 'x-' ] then map=cho "$map" | sed -e 's/^auto_/auto./' if echo $options | grep -- '-t' >/dev/null 2>&1 then mountoptions="--timeout $(echo $options | \sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')" fi options=echo "$options" | sed -e ' s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g s/\(^\|[ \t]\)-/\1/g' if [ ! -d $dir ] then mkdir -p $dir fi echo "/usr/sbin/automount $dir yp $map $options $localoptions" fi done ) fi } getmounts | sh ### End /etc/rc.d/rc.autofs ### |
| |||
| Johan wrote: > On Thu, 06 Nov 2003 11:04:44 +0000, Joost Kremers wrote: > >> Johan wrote: >>> All I need is a working rc.autofs script. >> >> well, you posted everything except (a link to) the rc.autofs script that >> you claim doesn't work. where can we find it, so we can take a look? > > I'm sorry, forgot to include it, I originally got it off google groups > (http://www.mail-archive.com/autofs@l.../msg02591.html) ok, if you read the entire thread, you would see that the script is quite broken, even the so-called "working" version that you copied. it wraps lines that should not be wrapped, it breaks lines at the wrong place, and it does not restore another problem of the original posting: the replacement of the sequence `e with ^E. one of the messages also contains this link: <http://www.linux-consulting.com//AutoFS/>, where you'll find an rc.autofs that will work with slackware. i use it myself (although i cut out the debian and rh modules and the distro check, because, well, you know. -- Joost Kremers since when is vi an editor? a discussion on vi belongs in comp.tools.unusable or something... ;-) |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2003-11-06, Johan <johanv@invalid.invalid> wrote: > > I want to automount my sony digital camera and have setup the following > > ### Begin /etc/auto.misc ### > sony -fstype=vfat,sync,nodev,suid :/dev/sda1 > ### End /etc/auto.misc ### If you'll only be using flat files, just call automount directly: /usr/sbin/automount --timeout 60 /auto file /etc/auto.misc Make sure /auto/ exists before you try this. Also, that autofs script you got sucks; in typical RedHat style, it makes something that should be easy into something way too complicated. To be fair, I think it does help deal with LDAP automount maps, but even that support is done pretty poorly and obscurely. - --keith - -- kkeller-usenet@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/qoI9hVcNCxZ5ID8RApC/AKCJTk2wIaRP7B1p+BRfagfF8u/6qQCfWkHE 2FiLXfUaUWsbkJHEi9L62m8= =y/FD -----END PGP SIGNATURE----- |
| ||||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2003-11-06, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote: > > Also, that autofs script you got sucks; Whoops--just read the script more carefully. It's b0rken, but it's not a RH script, it seems. Sorry for the confusion. Still, unless you have non-file maps I think it's easier just to call automount straight away without an intermediate script. - --keith - -- kkeller-usenet@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/qoLzhVcNCxZ5ID8RAjRwAKCbeGhFibDSba4hNni3FkdKOCoKlQ CffczR DL9QAQRzuYfVSitjBwQq7TY= =EYUW -----END PGP SIGNATURE----- |
| Thread Tools | |
| Display Modes | |
|
|