From: Josip Rodin Date: Mon, 2 Nov 2009 13:35:06 +0000 (+0100) Subject: zbog toga sto imunes gui po defaultu dodaje adrese skupa s maskom, treba koristiti... X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=5fc9c0bcb6c3bb4bfebcbfbded4311c9a5a6655b;p=imunes.git zbog toga sto imunes gui po defaultu dodaje adrese skupa s maskom, treba koristiti ip(8) svuda jer on to shvaca za razliku od ifconfiga, koji se ovime pretvara u samo opcionalni dependency --- diff --git a/linux/host.tcl b/linux/host.tcl index df276a7..c202e69 100755 --- a/linux/host.tcl +++ b/linux/host.tcl @@ -86,16 +86,16 @@ proc $MODULE.cfggen { node } { foreach ifc [ifcList $node] { set addr [getIfcIPv4addr $node $ifc] if { $addr != "" } { - lappend cfg "ifconfig $ifc inet add $addr" + lappend cfg "ip -4 addr add $addr dev $ifc" } set addr [getIfcIPv6addr $node $ifc] if { $addr != "" } { - lappend cfg "ifconfig $ifc inet6 add $addr" + lappend cfg "ip -6 addr add $addr dev $ifc" } } # sami napravimo localhost da ne moramo u VEu imati netbase+ifupdown - lappend cfg "ifconfig lo 127.0.0.1 netmask 255.0.0.0" + lappend cfg "ip addr add 127.0.0.1/8 dev lo" foreach statrte [getStatIPv4routes $node] { lappend cfg "ip -4 route add [lindex $statrte 0] via [lindex $statrte 1]" diff --git a/linux/pc.tcl b/linux/pc.tcl index 3d123e9..89ad04c 100755 --- a/linux/pc.tcl +++ b/linux/pc.tcl @@ -83,16 +83,16 @@ proc $MODULE.cfggen { node } { foreach ifc [ifcList $node] { set addr [getIfcIPv4addr $node $ifc] if { $addr != "" } { - lappend cfg "ifconfig $ifc inet add $addr" + lappend cfg "ip -4 addr add $addr dev $ifc" } set addr [getIfcIPv6addr $node $ifc] if { $addr != "" } { - lappend cfg "ifconfig $ifc inet6 add $addr" + lappend cfg "ip -6 addr add $addr dev $ifc" } } # sami napravimo localhost da ne moramo u VEu imati netbase+ifupdown - lappend cfg "ifconfig lo 127.0.0.1 netmask 255.0.0.0" + lappend cfg "ip addr add 127.0.0.1/8 dev lo" foreach statrte [getStatIPv4routes $node] { lappend cfg "ip -4 route add [lindex $statrte 0] via [lindex $statrte 1]"