View previous topic :: View next topic |
Author |
Message |
sirio81 n00b
Joined: 22 Jan 2006 Posts: 31
|
Posted: Mon Mar 20, 2006 12:50 pm Post subject: [risolto]Problema configurazione rete /etc/init.d/ |
|
|
Dopo aver aggiornato gentoo 2005.1 a 2006 ho
Code: |
less /etc/init.d/net.eth0
config_eth0=("192.168.54.27/24")
config_eth0=("default via 192.168.54.1") |
Code: | less /etc/init.d/net.lo
# file vuoto
|
Il file net.eth0 l'ho sostituito all'originale perchè mi erastato inserito uno script dopo l'aggiornamento che andava cercare il dhcp che non ho abilitato sul router.
Il problema è che ora all'avvio nessuna intefaccia viene abilitata.
Provo a dare
Code: | /etc/init.d/net.eth0 start |
ma non succede niente, ifconfig non restituisce nulla.
Quindi ogni volta devo dare a mano
Code: | ifconfig eth0 up
ifconfig lo up
ifconfig mio_ip
route add default gw mio_gw |
Cosa andrebbein net.lo ?
Come mai quando do "start" allo script net.eth0 non succede nulla?
Last edited by sirio81 on Tue Mar 21, 2006 1:03 pm; edited 2 times in total |
|
Back to top |
|
|
Luca89 Advocate
Joined: 27 Apr 2005 Posts: 2107 Location: Agrigento (Italy)
|
Posted: Mon Mar 20, 2006 12:54 pm Post subject: |
|
|
Probabilmente hai i file in /etc/init.d corrotti, net.lo non può essere vuoto. Prova a riemergere il baselayout e ricordati che le impostazioni si mettono in /etc/conf.d no /etc/init.d. _________________ Running Fast! |
|
Back to top |
|
|
sirio81 n00b
Joined: 22 Jan 2006 Posts: 31
|
Posted: Mon Mar 20, 2006 1:32 pm Post subject: |
|
|
Quote: | Probabilmente hai i file in /etc/init.d corrotti, net.lo non può essere vuoto. Prova a riemergere il baselayout e ricordati che le impostazioni si mettono in /etc/conf.d no /etc/init.d. |
Mi sono a dir poco confuso con init.d e conf.d.
Primi di riemergere baselayout provo a ripristinare il backup di /etc/init.d/net.eth0.
Sofrtunatamente non ho anche quello della lo.
Qualcuno potrebbe postare il suo
/etc/init.d/lo
per cortesia?
In conf.d, cosa va inserito nello script net.lo ?
config_lo=("127.0.0.1/8") ?
Per riemegere un pacchetto è sufficiente dare
emerge nome_pacchetto
o bisogna prima rimuoverlo ?
Grazie. |
|
Back to top |
|
|
bender86 Guru
Joined: 18 Mar 2005 Posts: 484
|
Posted: Mon Mar 20, 2006 2:05 pm Post subject: |
|
|
sirio81 wrote: | Primi di riemergere baselayout provo a ripristinare il backup di /etc/init.d/net.eth0.
Sofrtunatamente non ho anche quello della lo. | /etc/init.d/net.lo /etc/init.d/net.eth0 sono lo stesso file. Precisamente tutti i /etc/init.d/net.ethX sono un simlink a /etc/init.d/net.lo. Puoi provare a riemergere il pacchetto baselayout.
sirio81 wrote: | Mi sono a dir poco confuso con init.d e conf.d. | init.d non lo devi toccare, sono gli script di avvio. In conf.d ci metti le loro configurazioni.
sirio81 wrote: | In conf.d, cosa va inserito nello script net.lo ? | Non mettere nulla riguardo all'interfaccia lo.
sirio81 wrote: | Per riemegere un pacchetto è sufficiente dare
emerge nome_pacchetto
o bisogna prima rimuoverlo ? | emerge pacchetto. Viene automaticamente rimpiazzato da quello nuovo. |
|
Back to top |
|
|
Luca89 Advocate
Joined: 27 Apr 2005 Posts: 2107 Location: Agrigento (Italy)
|
Posted: Mon Mar 20, 2006 2:06 pm Post subject: |
|
|
Quote: | Qualcuno potrebbe postare il suo
/etc/init.d/lo
per cortesia? |
Il file fa parte del pacchetto sys-apps/baselayout, quindi ti consiglierei di dare un:
Code: | emerge --oneshot baselayout |
In modo da reinstallarlo e quindi riavere net.lo e tutti gli altri script di init sistemati. Naturalmente avrai anche un etc-update da fare dopo. _________________ Running Fast! |
|
Back to top |
|
|
Ic3M4n Advocate
Joined: 02 Nov 2004 Posts: 3489 Location: Bergamo.
|
Posted: Mon Mar 20, 2006 2:06 pm Post subject: |
|
|
è sufficiente un Code: | emerge --oneshot baselayout |
in ogni caso net.eth0 dovrebbe essere un link simbilico a net.lo |
|
Back to top |
|
|
sirio81 n00b
Joined: 22 Jan 2006 Posts: 31
|
Posted: Mon Mar 20, 2006 5:58 pm Post subject: |
|
|
Premessa: sono riuscito a raggiungere il mio scopo: eth0 e lo vengono caricate all'avvio ma non è andato tutto come ci potevamo aspettare.
Ho fatto
emerge --oneshot baselayout
env-update
e lo scritp /etc/init.d/net.lo è rimasto vuoto !!!!!!
Ho ripristinato il file di backup nominato nel precedente post e corretto un errore in /etc/conf.d/net
Fatto questo le interfacce vengono caricate ma ottengo degli errori al boot
Code: | /sbin/depsca.sh
could not get dependency info for "net.eth0" |
e altri che non riesco a riportare.
Le domande sono 2:
1-perchè emerge --oneshot baselayout non ha ripristinato gli script di avvio come avrebbe dovuto fare?
2-cosa sono i messaggi di errore che ricevo al boot? A cosa si riferiscono e che problemi posso avere?
Riporto ora la situazione prima che ripristinassi il backup:
------------
Riporto più informazioni possibili:
Code: | localhost sirio81 # ls -l /etc/conf.d/net*
-rw-r--r-- 1 root root 315 20 mar 18:14 /etc/conf.d/net
-rw-r--r-- 1 root root 17940 20 mar 17:17 /etc/conf.d/net.example
-rw------- 1 root root 2775 19 mar 11:53 /etc/conf.d/net.ppp0 |
Code: | localhost sirio81 # ls -l /etc/init.d/net*
lrwxrwxrwx 1 root root 6 20 mar 17:17 /etc/init.d/net.eth0 -> net.lo
-rwxr-xr-x 1 root root 24324 19 mar 21:43 /etc/init.d/net.eth0.bkp
-rwxr-xr-x 1 root root 1 20 mar 17:17 /etc/init.d/net.lo
-rwxr-xr-x 1 root root 3055 20 mar 17:17 /etc/init.d/netmount
-rwxr-xr-x 1 root root 4408 19 mar 11:53 /etc/init.d/net.ppp0 |
Code: | localhost sirio81 # more /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=("192.168.1.27/24")
routes_eth0=("default via 192.168.1.1") |
Code: | localhost sirio81 # more /etc/init.d/net.lo |
Non restituisce niente.
Anche net.eth0 non restituisce niente (è un link simblolico ad net.lo e sarebbe strano il contrario).
Code: | localhost sirio81 # more /etc/init.d/netmount
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
local myneed="net"
local myuse=""
# Only have Portmap as a dependency if there is a nfs mount in fstab
# that should be mounted at boot time. Also filter out comments.
local nfsmounts=$(awk '!/^#/ && ($3=="nfs" || $3=="nfs4") && $4 !~ /noau
to/ { print $0 }' /etc/fstab)
if [[ -n ${nfsmounts} ]] ; then
myneed="${myneed} portmap"
myuse="${myuse} nfs nfsmount"
else
myuse="${myuse} portmap"
fi
need ${myneed}
use ${myuse}
} |
---------- |
|
Back to top |
|
|
Frez Apprentice
Joined: 29 Aug 2003 Posts: 166
|
Posted: Mon Mar 20, 2006 6:25 pm Post subject: |
|
|
hai dato vero ? _________________ There is one more thing ... it's been emotional |
|
Back to top |
|
|
sirio81 n00b
Joined: 22 Jan 2006 Posts: 31
|
Posted: Mon Mar 20, 2006 7:36 pm Post subject: |
|
|
si
per conferma:
Code: | localhost src # etc-update
Scanning Configuration files...
Exiting: Nothing left to do; exiting. :) |
|
|
Back to top |
|
|
sirio81 n00b
Joined: 22 Jan 2006 Posts: 31
|
Posted: Tue Mar 21, 2006 12:32 pm Post subject: |
|
|
Dopo aver dato
emerge --depclean
gli errori sono spariti.
Ora sembra tutti regolare. |
|
Back to top |
|
|
Galanti Davide Tux's lil' helper
Joined: 23 Feb 2006 Posts: 148 Location: Milano (Italy)
|
Posted: Tue Mar 21, 2006 12:39 pm Post subject: |
|
|
sirio81 wrote: | Dopo aver dato
emerge --depclean
gli errori sono spariti.
Ora sembra tutti regolare. |
Se hai risolto il problema, per favore metti il tag [Risolto] all'inizio del topic editando il tuo primo messaggio. |
|
Back to top |
|
|
|