Änderungen

Zur Navigation springen Zur Suche springen
863 Bytes hinzugefügt ,  00:41, 8. Okt. 2006
keine Bearbeitungszusammenfassung
===Netzkarte als .dot-Datei ausgeben mit olsrd-plaintext-plugin===
<pre>
#!/bin/sh

D=$(date|sed -e's/[:T-]/ /g'|while read t m t h mi r r r y;do echo $y$m$t-$h"uhr"$mi;done)
F="netzkarte-("$(nvram get wl0_ssid)")-"$D".dot"

echo "Content-type: application/octet-stream"
echo "Content-Disposition: attachment; filename=\"$F\""
echo -e "\ngraph g {"

awk '/10.63./ {
IP=$1
gsub(/\./,"A",$1)
gsub(/[^a-zA-Z0-9. ]/,"",$2)
gsub(/.olsr/,"",$2)
print "A"$1"[label=\""$2"\\n("IP")\"];"}' /etc/hosts
wget -O - http://127.0.0.1:2006|awk '{
if(s==1){
if($0=="")exit
if($5!="0.00"&&$5<11){
if($5<11)arg="dotted"
if($5<7)arg="dashed"
if($5<4)arg="normal"
if($5<2)arg="bold"
style="[style="arg"];"
if(arg=="normal")style=";"
gsub(/\./,"A",$1)
gsub(/\./,"A",$2)
print "A"$1" -- A"$2,style
}}
if($2=="Topology")s=1}END{print "}"}'
</pre>

Navigationsmenü