[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [NOVICE] Min Linux kan ikke se netværket



Jens Bang wrote:

> > > cat /proc/net/dev |grep : | cut -d : -f 1 | grep eth0 >/dev/null 2>&1
> > >
> > > if [ $? -eq 0 ] ; then
....
> Og nu virker det. Det kan godt se ud til at testen i if sætningen ikke går
> godt. Hvad betyder
> 
>       [ $? -eq 0 ] ;
> 
> egentlig?

Det betyder: Hvis status for sidste kommando er 0 (OK), så...

Kommando(erne) før læser filen /proc/net/dev, leder efter kolon, leder
efter første felt før
kolon, og til sidste spørges om ordet "eth0" optræder. Hvis ja, sættes
status til 0.

Hvad sker der hvis du fjerner dine ekstra linier, rebooter, og så
skriver:

cat /proc/net/dev |grep : | cut -d : -f 1 | grep eth0

Hvis den ikke skriver "eth0" må det have noget at gøre med, at din
driver
til eth0 først bliver loaded når du starter ifconfig.

Mogens
-- 
Mogens Kjaer, Carlsberg Laboratory, Dept. of Chemistry
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: sslug@sslug Homepage: http://www.crc.dk


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:57 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *