Diffstat (limited to 'noncore/settings/networksettings2/network') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/network/network_NNI.cpp | 11 | ||||
-rw-r--r-- | noncore/settings/networksettings2/network/networkrun.cpp | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/noncore/settings/networksettings2/network/network_NNI.cpp b/noncore/settings/networksettings2/network/network_NNI.cpp index 78e6545..34dac54 100644 --- a/noncore/settings/networksettings2/network/network_NNI.cpp +++ b/noncore/settings/networksettings2/network/network_NNI.cpp | |||
@@ -113,16 +113,16 @@ short ANetwork::generateFile( SystemFile &SF, | |||
113 | rvl = 1; | 113 | rvl = 1; |
114 | if( SF.name() == "interfaces" ) { | 114 | if( SF.name() == "interfaces" ) { |
115 | Log(("Generate Network for %s\n", SF.name().latin1() )); | 115 | Log(("Generate Network for %s\n", SF.name().latin1() )); |
116 | // we can safely call from here since device item is deeper | 116 | // we can safely call from here since device item is deeper |
117 | if( Data.UseDHCP ) { | 117 | if( Data.UseDHCP ) { |
118 | SF << "iface " | 118 | SF << "iface " |
119 | << NIC | 119 | << "A" |
120 | << "-c" | ||
121 | << connection()->number() | 120 | << connection()->number() |
122 | << "-allowed inet dhcp" | 121 | << NIC |
122 | << " inet dhcp" | ||
123 | << endl; | 123 | << endl; |
124 | SF << " up echo \"" | 124 | SF << " up echo \"" |
125 | << NIC | 125 | << NIC |
126 | << "\" > /tmp/profile-" | 126 | << "\" > /tmp/profile-" |
127 | << connection()->number() | 127 | << connection()->number() |
128 | << ".up" | 128 | << ".up" |
@@ -136,15 +136,16 @@ short ANetwork::generateFile( SystemFile &SF, | |||
136 | SF << " down rm -f /tmp/profile-" | 136 | SF << " down rm -f /tmp/profile-" |
137 | << connection()->number() | 137 | << connection()->number() |
138 | << ".up" | 138 | << ".up" |
139 | << endl; | 139 | << endl; |
140 | } else { | 140 | } else { |
141 | SF << "iface " | 141 | SF << "iface " |
142 | << NIC << "-c" | 142 | << "A" |
143 | << connection()->number() | 143 | << connection()->number() |
144 | << "-allowed inet static" | 144 | << NIC |
145 | << " inet static" | ||
145 | << endl; | 146 | << endl; |
146 | SF << " up echo \"" | 147 | SF << " up echo \"" |
147 | << NIC | 148 | << NIC |
148 | << "\" > /tmp/profile-" | 149 | << "\" > /tmp/profile-" |
149 | << connection()->number() | 150 | << connection()->number() |
150 | << ".up" | 151 | << ".up" |
diff --git a/noncore/settings/networksettings2/network/networkrun.cpp b/noncore/settings/networksettings2/network/networkrun.cpp index 2c93d9d..74467ad 100644 --- a/noncore/settings/networksettings2/network/networkrun.cpp +++ b/noncore/settings/networksettings2/network/networkrun.cpp | |||
@@ -3,13 +3,13 @@ | |||
3 | #include <resources.h> | 3 | #include <resources.h> |
4 | #include "networkrun.h" | 4 | #include "networkrun.h" |
5 | 5 | ||
6 | State_t NetworkRun::detectState( void ) { | 6 | State_t NetworkRun::detectState( void ) { |
7 | InterfaceInfo * II = nodeCollection()->assignedInterface(); | 7 | InterfaceInfo * II = nodeCollection()->assignedInterface(); |
8 | 8 | ||
9 | Log(( "Interface %p : %d\n", II, (II) ? II->IsUp : 0 )); | 9 | Log(( "Interface %p %p : %d\n", II, nodeCollection(), (II) ? II->IsUp : 0 )); |
10 | if( II && II->IsUp ) { | 10 | if( II && II->IsUp ) { |
11 | // device has assigned interface | 11 | // device has assigned interface |
12 | return IsUp; | 12 | return IsUp; |
13 | } | 13 | } |
14 | 14 | ||
15 | // had no interface or interface is no longer up -> release | 15 | // had no interface or interface is no longer up -> release |
@@ -35,15 +35,16 @@ QString NetworkRun::setMyState( NodeCollection * NC, Action_t A, bool ) { | |||
35 | } else if( A == Down ) { | 35 | } else if( A == Down ) { |
36 | SL << "ifdown"; | 36 | SL << "ifdown"; |
37 | } else { | 37 | } else { |
38 | return QString(); | 38 | return QString(); |
39 | } | 39 | } |
40 | 40 | ||
41 | SL << QString().sprintf( "%s=%s-c%d-allowed", | 41 | SL << QString().sprintf( "%s=A%ld%s", |
42 | II->Name.latin1(), II->Name.latin1(), | 42 | II->Name.latin1(), |
43 | nodeCollection()->number() ); | 43 | nodeCollection()->number(), |
44 | II->Name.latin1() ); | ||
44 | 45 | ||
45 | if( ! NSResources->system().runAsRoot( SL ) ) { | 46 | if( ! NSResources->system().runAsRoot( SL ) ) { |
46 | return QString("Cannot call %1").arg(SL.join(" ")); | 47 | return QString("Cannot call %1").arg(SL.join(" ")); |
47 | } | 48 | } |
48 | 49 | ||
49 | return QString(); | 50 | return QString(); |