Diffstat (limited to 'noncore/settings/networksettings2/network/networkrun.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/network/networkrun.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/network/networkrun.cpp b/noncore/settings/networksettings2/network/networkrun.cpp index c19235a..41e1c53 100644 --- a/noncore/settings/networksettings2/network/networkrun.cpp +++ b/noncore/settings/networksettings2/network/networkrun.cpp | |||
@@ -16,26 +16,26 @@ void NetworkRun::detectState( NodeCollection * NC ) { | |||
16 | // has no interface -> delegate | 16 | // has no interface -> delegate |
17 | RI->detectState( NC ); | 17 | RI->detectState( NC ); |
18 | } | 18 | } |
19 | 19 | ||
20 | bool NetworkRun::setState( NodeCollection * NC, Action_t A ) { | 20 | bool NetworkRun::setState( NodeCollection * NC, Action_t A, bool Force ) { |
21 | // we handle UP and DOWN | 21 | // we handle UP and DOWN |
22 | RuntimeInfo * RI = netNode()->nextNode()->runtime(); | 22 | RuntimeInfo * RI = netNode()->nextNode()->runtime(); |
23 | AsDevice * Next = RI->asDevice(); | 23 | AsDevice * Next = RI->asDevice(); |
24 | InterfaceInfo * II = Next->assignedInterface(); | 24 | InterfaceInfo * II = Next->assignedInterface(); |
25 | 25 | ||
26 | if( A == Up ) { | 26 | if( A == Up ) { |
27 | // we can bring UP if lower level is available | 27 | // we can bring UP if lower level is available |
28 | if( NC->currentState() == Available ) { | 28 | if( NC->currentState() == Available || Force ) { |
29 | QString S; | 29 | QString S; |
30 | S.sprintf( "ifup %s=%s-c%d-allowed", | 30 | S.sprintf( "ifup %s=%s-c%d-allowed", |
31 | II->Name.latin1(), II->Name.latin1(), | 31 | II->Name.latin1(), II->Name.latin1(), |
32 | connection()->number() ); | 32 | connection()->number() ); |
33 | NSResources->system().runAsRoot( S ); | 33 | NSResources->system().runAsRoot( S ); |
34 | } | 34 | } |
35 | return 1; | 35 | return 1; |
36 | } else if( A == Down ) { | 36 | } else if( A == Down ) { |
37 | if( NC->currentState() == IsUp ) { | 37 | if( NC->currentState() == IsUp || Force ) { |
38 | QString S; | 38 | QString S; |
39 | S.sprintf( "ifdown %s=%s-c%d-allowed", | 39 | S.sprintf( "ifdown %s=%s-c%d-allowed", |
40 | II->Name.latin1(), II->Name.latin1(), | 40 | II->Name.latin1(), II->Name.latin1(), |
41 | connection()->number() ); | 41 | connection()->number() ); |