Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bloccare net.eth0 all'avvio [risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sat Feb 17, 2007 7:26 pm    Post subject: bloccare net.eth0 all'avvio [risolto] Reply with quote

Fino ad un paio di giorni fa tutto era ok, e lo script di avvio net.eth0 non partiva mai all'avvio (siccome non è sempre collegato preferisco collegare manualmente con un client dhcp in seguito se mi serve). Da ieri, dopo un aggiornamento di massa (era da un po' che non lo facevo) ha iniziato a partirmi la ricerca di un ip per la scheda con dhcp all'avvio, come se net.eth0 fosse impostato, ma non lo è, come mi conferma l'output di "rc-update -s".
Quindi mi chiedo... cosa può essere a richiamare net.eth0 quando non dovrebbe esserlo? Thx
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)


Last edited by Gr3yFox on Mon Feb 19, 2007 3:28 pm; edited 3 times in total
Back to top
View user's profile Send private message
ThorOdino
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2006
Posts: 103

PostPosted: Sat Feb 17, 2007 7:30 pm    Post subject: Reply with quote

RC_PLUG_SERVICES="!net.eth0"
in /etc/conf.d/rc

Almeno cosi io blocco l'ethernet e avvio solo eth1, wireless
_________________
www.ThorOdino.eu
FreeTheBikers
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sat Feb 17, 2007 7:33 pm    Post subject: Reply with quote

Forse era quello... ora non posso provare che sto compilandomi dei nuovi software, più tardi provo. Ti ringrazio.
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Sun Feb 18, 2007 12:38 am    Post subject: Reply with quote

in alternativa puoi installare questo:
Quote:
ale@heavensdoor ~ $ eix netplug
* sys-apps/netplug
Available versions: 1.2.9-r2 1.2.9-r3
Installed: 1.2.9-r3(19:42:56 05/10/2006)
Best versions/slot: 1.2.9-r3
Homepage: http://www.red-bean.com/~bos/
Description: Brings up/down ethernet ports automatically with cable detection
License: GPL-2

Una volta emerso puoi tranquillamente aggiungere tutte le reti ethernet che vuoi al tuo runlevel. Gli initscript di gentoo supportano automaticamente questo simpatico programma e ti avvieranno la ethernet solo se trovano un cavo collegato.

puoi usare anche ifplug ma personalmente mi sono trovato meglio con netplug
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sun Feb 18, 2007 2:47 pm    Post subject: Reply with quote

Poi ho riavviato ed il problema è stato risolto, ma ora che me lo dici rimuovo quella opzione di configurazione da rc ed emergo netplug.
Grazie a tutti e due :D
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sun Feb 18, 2007 3:29 pm    Post subject: Reply with quote

Gr3yFox wrote:
Poi ho riavviato ed il problema è stato risolto, ma ora che me lo dici rimuovo quella opzione di configurazione da rc ed emergo netplug.
Grazie a tutti e due :D

sì, peccato che netplug aggiri il problema ma non lo risolva.
tu volevi che la scheda di rete non fosse attivata all'avvio. così viene attivata comunque

adesso il caricamento dei moduli e l'attivazione dei dispositivi è passato da coldplug a udev, che ne integra le funzionalità.
dovresti dire al tuo udev di non attivare i dispositivi di rete aggiungendo una riga a /etc/udev/rules.d/05-udev-early.rules
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sun Feb 18, 2007 3:33 pm    Post subject: Reply with quote

cioè se metto netplug all'avvio mi tocca aspettare come al solito che vada in timeout la ricerca di un ip per la scheda perchè la tira su comunque?
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sun Feb 18, 2007 3:36 pm    Post subject: Reply with quote

Gr3yFox wrote:
cioè se metto netplug all'avvio mi tocca aspettare come al solito che vada in timeout la ricerca di un ip per la scheda perchè la tira su comunque?

no. quell'operazione viene lasciata in background.

però la scheda di rete viene attivata comuqnue, ed è un dispositivo in più con relativo modulo (anzi, almeno due moduli) che vengono caricati inutilmente, se la scheda non ti serve
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sun Feb 18, 2007 3:41 pm    Post subject: Reply with quote

Ah, i moduli. Veramente ho messo su un kernel piuttosto monolitico, tutti i moduli che usa la scheda di rete sono built-in, quindi non so se a questo punto convenga davvero disabilitarne l'attivazione...
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sun Feb 18, 2007 3:47 pm    Post subject: Reply with quote

Gr3yFox wrote:
Ah, i moduli. Veramente ho messo su un kernel piuttosto monolitico, tutti i moduli che usa la scheda di rete sono built-in, quindi non so se a questo punto convenga davvero disabilitarne l'attivazione...

vedi tu... nel caso di sistemi non sempre connessi alla rete, la cosa più corretta sarebe disattivare l'attivazione automatica da parte di udev e lanciare il servizio solo quando serve. comuqnue la scelta è tua
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sun Feb 18, 2007 4:03 pm    Post subject: Reply with quote

Sono scoppiato da tutti gli esami, preferisco non andare a cercare come scrivere le regole per udev, almeno per ora penso che possa restare così.
A proposito di netplug, non mi pare che abbia installato un'initscript... devo scriverlo io?
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sun Feb 18, 2007 4:25 pm    Post subject: Reply with quote

Gr3yFox wrote:
A proposito di netplug, non mi pare che abbia installato un'initscript... devo scriverlo io?

no
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sun Feb 18, 2007 4:28 pm    Post subject: Reply with quote

stando alla doc dovrebbe esistere /etc/rc.d/init.d/netplugd ma non c'è
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Sun Feb 18, 2007 4:29 pm    Post subject: Reply with quote

Gr3yFox wrote:
stando alla doc dovrebbe esistere /etc/rc.d/init.d/netplugd ma non c'è

non serve initscript si integra con baselayout
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sun Feb 18, 2007 4:30 pm    Post subject: Reply with quote

ah ecco, non era mica chiaro leggendo il man :D
grazie.
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Sun Feb 18, 2007 4:43 pm    Post subject: Reply with quote

ok testato e funzionante, grazie a tutti per l'aiuto. metto il tag risolto.
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Sun Feb 18, 2007 11:36 pm    Post subject: Reply with quote

Gr3yFox wrote:
A proposito di netplug, non mi pare che abbia installato un'initscript... devo scriverlo io?

Come ti ho detto viene supportato automaticamente dagli script di init della rete.
Se vuoi disattivarlo per una determinata interfaccia devi mettere in /etc/conf.d/net qualcosa del tipo
Code:
modules_eth0=( "!plug" )
altrimenti niente... fa tutto da se.
Inoltre non devi aspettare proprio niente... l'interfaccia si attiva in background e se trova un cavo attaccato la tira su, altrimenti la ributta giù :wink:
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Mon Feb 19, 2007 2:45 pm    Post subject: Reply with quote

Per attivarlo solo su eth0 ho semplicemente sostituito eth* con eth0 nel suo file di configurazione in /etc.
Però ora è spuntato un piccolo problema... se non ho cavi collegati ad eth0, e provo ad avviare apache2 mi dice che è schedulato per partire assieme a net.eth0... :(
Come faccio a far partire apache anche quando non ho il cavo di rete connesso?
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Mon Feb 19, 2007 3:26 pm    Post subject: Reply with quote

un problema= un thread
In ogni caso chiarisciti cosa vuoi... prima vuoi stoppare eth0 senza cavo, poi la vuoi far partire lo stesso... semplice, devi deciderti. Altrimenti modificati l'initscript di apache e rimuovi il "need net" dalla funzione "depend()" o spippola tra le configurazioni di apache... boh
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
Gr3yFox
Apprentice
Apprentice


Joined: 11 May 2006
Posts: 218
Location: Genoa, Italy

PostPosted: Mon Feb 19, 2007 3:31 pm    Post subject: Reply with quote

si è vero scusa a prima vista mi sembrava che fosse un problema inerente a netplug, quindi pensavo andasse bene chiedere in questo thread, ma in effetti ora che me lo fai notare non c'azzecca un tubo.
chiedo scusa
_________________
GreyFox (Linux registered user #435102)
greyfox.imente.org - GreyFox's shots (photoblog)
Back to top
View user's profile Send private message
Delian
n00b
n00b


Joined: 24 Jul 2006
Posts: 12

PostPosted: Sat Mar 03, 2007 8:24 pm    Post subject: Reply with quote

Un altro workaround e' di utilizzare la funzione preup, evitando di avere programmi in giro solo per questa cosa e aggiungendo una funzione molto simpatica :).
Per maggiori dettagli puoi provare a seguire questa guida che ho scritto sul mio blog:
http://delian.wordpress.com/2007/02/19/come-evitare-che-uninterfaccia-venga-avviata-al-boot/
Back to top
View user's profile Send private message
drumpaul
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2006
Posts: 107

PostPosted: Tue Mar 20, 2007 7:57 am    Post subject: [netboot] perché runlevel boot avvia net.eth0?[RISOLTO] Reply with quote

Come da oggetto vorrei chiarimento a questa domanda, tenendo conto che l'obiettivo è quello, come da guida d'insallazione gentoo, di aver la possibilità di avviare un portatile senza l'attivazione dell'interfaccia di rete come dovrebbe essere in modalità 'standalone' o offline o quello che è...

ora come ora do il parametro softlevel=nonetwork alla direttiva di grub per avviare il kernel con nonetwork al posto di default ma non ho il risultato sperato.

Grazie per il supporto, ciao.


Last edited by drumpaul on Tue Mar 20, 2007 8:22 am; edited 1 time in total
Back to top
View user's profile Send private message
makaveli87
Guru
Guru


Joined: 22 Aug 2005
Posts: 311
Location: Italy

PostPosted: Tue Mar 20, 2007 8:09 am    Post subject: Reply with quote

Non so se potrebbe essere dovuto a questo.. (do solo un'idea)

/etc/conf.d/rc
Code:

# Some people want a finer grain over hotplug/coldplug. RC_PLUG_SERVICES is a
# list of services that are matched in order, either allowing or not. By
# default we allow services through as RC_COLDPLUG/RC_HOTPLUG has to be yes
# anyway.
# Example - RC_PLUG_SERVICES="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.

RC_PLUG_SERVICES="!net.eth0"

_________________
GoogleTalk: romanovic@gmail.com
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Tue Mar 20, 2007 8:21 am    Post subject: Reply with quote

Quoto makaveli87, RC_PLUG_SERVICES è la soluzione al problema 8)
_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
drumpaul
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2006
Posts: 107

PostPosted: Tue Mar 20, 2007 8:22 am    Post subject: Reply with quote

Perfetto, fa proprio quello che volevo con l'opzione che mi hai indicato.
Mi scuso per l'ignoranza ma non ho 'guardato' poche volte rc e sinceramente non avevo colto le possibilità offerte da questa opzione.

Grazie mille
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum