🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #15312

Re: obtener la ip asignada de la interfaz ppp0

#15312
From: iLogik
Date: Tue, 18 Jul 2000 00:00
36 lines
2016 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Roger" == Roger J <Roger_J@localhost.localdomain> writes:

    Roger> Bien lo solvente heciendo que mi script ejecute un "netstat
    Roger> -nr", filtre y se quede con la ip de la liniea ppp, y
    Roger> funcionar funciona, lo que pasa es que me parece una manera
    Roger> bastante cutre de obtener ese valor, por eso me preguntaba
    Roger> si alguien conoceria alguna manera mas elegante.

O ifconfig ppp0|grep "inet addr"|cut -f 2 -d:|awk '{print $1}'
O lee la variable $PPP_LOCAL que pppd manda como parametro a los
scripts ip-up e ip-down

Saludos.
- -- 
�Cu�nto tiempo me llevar� hacer un trabajo?

M�todo de Murphy :
  Se toma el tiempo que debe durar, se multiplica por dos, y se pasa
  a la unidad de tiempo inmediatamente superior.
Ejemplo:
  Si un trabajo me deber�a llevar 2 d�as, seg�n Murphy tardar�:
  2 x 2 = 4 d�as , es decir , 4 Semanas.
       Carlos B. Ruiz                  Regist. Linux User #99885
       AKA iLogik en el Irc-Hispano    email: ilogik@cryogen.com
       Clave publica gpg:              email con subject [PGPKEY]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.5 and Gnu Privacy Guard <http://www.gnupg.org/>

iD8DBQE5dKQaBViOqY8wI+YRAo53AJwJzBv4x1lUPjsCx+Ti2HfqFtsZYQCfR2Dg
jQkHQf9X6MZhSklO89U8aiY=
=emmy
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <87itu35lnn.fsf@chaos.rpm.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8n9bsj.17m.Roger_J@localhost.localdomain>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,936adf4464d584f5
X-Google-Attributes: gidf86c8,public
From: iLogik <ilogik@cryogen.com>
Subject: Re: obtener la ip asignada de la interfaz ppp0
Date: 2000/07/18
Message-ID: <87itu35lnn.fsf@chaos.rpm.org>
X-Deja-AN: 648142130
Content-Transfer-Encoding: 8bit
References: <slrn8n9bsj.17m.Roger_J@localhost.localdomain>
Organization: Ninguna
Content-Type: text/plain; charset=iso-8859-1
User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.5
Mime-Version: 1.0
Newsgroups: es.comp.os.linux.programacion