atunci, daca are access la ping, grep si awk:
[EMAIL PROTECTED] ~]# ping -I eth0 -w 1 -c 1 localhost | grep PING | awk
'{print $5;}'
172.18.7.1
[EMAIL PROTECTED] ~]#
sau "cut" in loc de awk:
[EMAIL PROTECTED] ~]# ping -I eth0 -w 1 -c 1 localhost | grep PING |
cut -f5 -d' '
172.18.7.1
[EMAIL PROTECTED] ~]#
ahahahaha... mortii lui de aerobic :)
$ ping -I eth0 -w1 -c1 localhost
Warning: cannot bind to specified iface, falling back: Operation not
permitted
PING localhost.localdomain (127.0.0.1) from 127.0.0.1 eth0: 56(84) bytes
of data.
--- localhost.localdomain ping statistics ---
24 packets transmitted, 0 received, 100% packet loss, time 23010ms
Pana la urma, Dane, ai acces la ce anume pe masina aia? Ping? sort?
grep? awk? cut?
pentru wolfy, nu exista /etc/sysconfig (deloc :) )
pentru cine a zis de /etc/rc.d, nu exista nimic nici acolo.
facind mai multe teste (inclusiv pe mai multe masini normale) am dedus
ca, daca am o singura interfata de retea, pot gasi adresa in hex cam
asa:
cat /proc/net/rt_cache | grep 1500 | head -n1 | cut -f15 (culmea, am
toate aceste comenzi :) )
mai departe e ar'metica. desigur, nu e o solutie universala, valabila
oriunde, dar ma intereseaza doar ca merge pe troacele alea.
_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug