automount non va!!!!!

Se avete problemi con l'installazione e la configurazione di Slackware postate qui. Non usate questo forum per argomenti generali... per quelli usate Gnu/Linux in genere.

Moderatore: Staff

Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Slackware, se l'argomento è generale usate il forum Gnu/Linux in genere.
3) Leggere attentamente le risposte ricevute.
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
Rispondi
slackwarelife
Linux 0.x
Linux 0.x
Messaggi: 47
Iscritto il: gio 13 nov 2003, 0:00

automount non va!!!!!

Messaggio da slackwarelife »

Salve a tutto il forum, vi scrivo perchè ho il seguente problema:
<BR>automount non monta in automatico i devices e non so dove sbaglio, di
<BR>seguito riporto la procedura da me seguita per configurare
<BR>l´applicativo:
<BR>distro utilizzata slackware-current
<BR>kernel il 2.6.11.9-smp da me compilato
<BR><br />
<BR>La procedura è la seguente:
<BR>in /etc/rc.d ho inserito il seguente script rc.autofs che di seguito riporto:<br />
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR><pre>#!/bin/sh<br />#<br /># Date : Feb 04, 2004<br /># Author : Terminator, <br />#<br /># rc.autofs - Starts the filesystem automounter<br /># Based on rc.autofs by David Cantrell, <br /><br />#<br /># This function will build a list of automount commands to execute in<br /># order to activate all the mount points. It is used to figure out<br /># the difference of automount points in case of a reload<br />#<br />function getmounts()<br />{<br /> # Check for local maps to be loaded<br /> if [ -f /etc/auto.master ]<br /> then<br /> cat /etc/auto.master | sed -e ´/^#/d´ -e ´/^$/d´| (<br /> while read dir map options<br /> do<br /> if [ ! -z "$dir" -a ! -z "$map" \<br /> -a x`echo "$map" | cut -c1` != ´x-´ ]<br /> then<br /> map=`echo "/etc/$map" | sed -e ´s:^/etc//:/:´`<br /> options=`echo "$options" | sed -e ´s/\(^\|[ \t]\)-/\1/g´`<br /><br /> if [ ! -d $dir ]<br /> then<br /> mkdir -p $dir<br /> fi<br /><br /> if [ -x $map ]<br /> then<br /> echo "/usr/sbin/automount -p /var/run/automount.pid -t 3 $dir program $map $options $localoptions"<br /> elif [ -f $map ]<br /> then<br /> echo "/usr/sbin/automount -p /var/run/automount.pid -t 3 $dir file $map $options $localoptions"<br /> else<br /> echo "/usr/sbin/automount -p /var/run/automount.pid -t 3 $dir `basename $map` $options $localoptions"<br /> fi<br /> fi<br /> done )<br /> fi<br /><br /> # Check for NIS maps to be loaded<br /> if [ -e /usr/bin/ypcat ] && <br /> [ `ypcat -k auto.master 2>/dev/null | wc -l` -gt 0 ]<br /> then<br /> ypcat -k auto.master | (<br /> while read dir map options<br /> do<br /> if [ ! -z "$dir" -a ! -z "$map" \<br /> -a x`echo "$map" | cut -c1` != ´x-´ ]<br /> then<br /> map=`echo "$map" | sed -e ´s/^auto_/auto./´`<br /><br /> if echo $options | grep -- ´-t´ >/dev/null 2>&1<br /> then<br /> mountoptions="--timeout $(echo $options | \<br /> sed ´s/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g´)"<br /> fi<br /><br /> options=`echo "$options" | sed -e ´<br /> s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g<br /> s/\(^\|[ \t]\)-/\1/g´`<br /><br /> if [ ! -d $dir ]<br /> then<br /> mkdir -p $dir<br /> fi<br /><br /> echo "/usr/sbin/automount -p /var/run/automount.pid -t 3 $dir yp $map $options $localoptions"<br /> fi<br /> done )<br /> fi<br />}<br /><br /><br />autofs_start() {<br /> if [ -x /usr/sbin/automount ]; then<br /> echo -n "Starting autofs daemons... "<br /> (grep -q autofs /proc/filesystems || modprobe -q autofs || modprobe -q autofs4) 2> /dev/null<br /> getmounts | sh<br /> fi<br />}<br /><br />autofs_stop() {<br /> echo -n "Stopping autofs daemons... "<br /> umount -a -f -t autofs 2> /dev/null<br /> killall -15 automount 2> /dev/null<br /> modprobe -q -r isofs 2> /dev/null<br /> (modprobe -q -r autofs4 || modprobe -q -r autofs) 2> /dev/null<br />}<br /><br />autofs_restart() {<br /> autofs_stop<br /> sleep 1<br /> autofs_start<br />}<br /><br />case "$1" in<br />´start´)<br /> autofs_start<br /> ;;<br />´stop´)<br /> autofs_stop<br /> ;;<br />´restart´)<br /> autofs_restart<br /> ;;<br />*)<br /> echo "usage $0 start|stop|restart"<br />esac</pre>In /etc ho inserito il file auto.master con la seguente riga:
<BR>
<BR><br />
<BR>/media /etc/auto.rd --timeout=3<br />
<BR>E sempre in /etc ho aggiunto il file auto.rd con i seguenti comandi:
<BR>
<BR><br />
<BR>floppy -fstype=vfat,sync,user,umask=002,gid=users :/dev/fd0
<BR><br />
<BR>cdrom -fstype=iso9660,user,ro :/dev/cdrom
<BR><br />
<BR>dvd -fstype=auto,user,ro :/dev/dvd
<BR><br />
<BR>usbdisck -fstype=auto,sync,user,umask=002,gid=users :/dev/sda1
<BR><br />
<BR>zip -fstype=auto,sunc,user,umask=002,gid=users :/dev/hdb1
<BR><br />
<BR>zip1 -fstype=auto,sunc,user,umask=002,gid=users :/dev/hdb4
<BR>
<BR><br />
<BR>Ho reso eseguibile il file rc.autofs ed ho inserito in rc.local il comando:
<BR>
<BR><br />
<BR>#attivo autofs
<BR><br />
<BR>if [ -x /etc/rc.d/rc.autofs ]; <br />
<BR>then
<BR> /etc/rc.d/rc.autofs start
<BR><br />
<BR>fi
<BR>
<BR><br />
<BR>Ho tolto da /etc/fstap i device sopra elencati perchè mi aspettavo che
<BR>nel momento del caricamento si sarebbe creata la rispettiva directory
<BR>in /media, ma nulla (non viene creata neanche la directory media in automatico, invece dovrebbe farlo), dove sbaglio?
<BR><br />
<BR><br />
<BR>grazie
<BR><BR><BR>[ Questo Messaggio è stato Modificato da: slackwarelife il 02-06-2005 13:49 ]<br>

jaco1279
Linux 0.x
Linux 0.x
Messaggi: 28
Iscritto il: mar 14 dic 2004, 0:00

automount non va!!!!!

Messaggio da jaco1279 »

Ciao...io ho configurato da poco slack per l´automount...sinceramente ho seguito alla lettera l´how-to di ZioLELE che trovi in questo sito...sincermente...a parte un attimo di titubanza nel montaggio solo del pen drive...per il resto non ho trovato nessun problema...ho fatto pure le icone sul desktop come collegamento ad una URL linkando la directory di montaggio!!!!Beh...dacci una guardata...se continui ad avere problemi...fai un fischio!!!<br /><br />jaco<br>

samiel
Staff
Staff
Messaggi: 5511
Iscritto il: ven 16 gen 2004, 0:00
Nome Cognome: Mauro Sacchetto
Slackware: 13.0
Kernel: 2.26
Desktop: KDE
Distribuzione: anche Debian
Località: Venezia

automount non va!!!!!

Messaggio da samiel »

La righe di attivazione potebbero andare anche in in rc.M,<br />
<BR>ma lascia stare questi script che danno sempre qualche problema.<br />
<BR>È molto più semplice attivare il servizio senza script,<br />
<BR>Inserisci in rc.loca semplicemente:<br />
<BR><p align="justify">
<BR><strong>/usr/sbin/automount
<BR>--timeout 10 /misc file /etc/auto.rd</strong></p>
<BR><br />
<BR>e dovrebbe andare.<br />
<BR><br />
<BR>M.<br /><br>

slackwarelife
Linux 0.x
Linux 0.x
Messaggi: 47
Iscritto il: gio 13 nov 2003, 0:00

automount non va!!!!!

Messaggio da slackwarelife »

Ok adesso funziona, grazie a tutti.<br /><br>

Rispondi