Diffstat (limited to 'noncore/settings/networksettings2/network/network_NNI.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/network/network_NNI.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/network/network_NNI.cpp b/noncore/settings/networksettings2/network/network_NNI.cpp index eac2d66..054385a 100644 --- a/noncore/settings/networksettings2/network/network_NNI.cpp +++ b/noncore/settings/networksettings2/network/network_NNI.cpp | |||
@@ -90,27 +90,30 @@ QWidget * ANetwork::edit( QWidget * parent ) { | |||
90 | return GUI; | 90 | return GUI; |
91 | } | 91 | } |
92 | 92 | ||
93 | QString ANetwork::acceptable( void ) { | 93 | QString ANetwork::acceptable( void ) { |
94 | return ( GUI ) ? GUI->acceptable( ) : QString(); | 94 | return ( GUI ) ? GUI->acceptable( ) : QString(); |
95 | } | 95 | } |
96 | 96 | ||
97 | void ANetwork::commit( void ) { | 97 | void ANetwork::commit( void ) { |
98 | if( GUI && GUI->commit( Data ) ) | 98 | if( GUI && GUI->commit( Data ) ) |
99 | setModified( 1 ); | 99 | setModified( 1 ); |
100 | } | 100 | } |
101 | 101 | ||
102 | bool ANetwork::hasDataFor( const QString & S ) { | ||
103 | return S == "interfaces"; | ||
104 | } | ||
105 | |||
102 | bool ANetwork::generateDataForCommonFile( SystemFile & S, long DevNr ) { | 106 | bool ANetwork::generateDataForCommonFile( SystemFile & S, long DevNr ) { |
103 | AsDevice * Dev = runtime()->device(); | 107 | QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr ); |
104 | QString NIC = Dev->genNic( DevNr ); | ||
105 | 108 | ||
106 | if( S.name() == "interfaces" ) { | 109 | if( S.name() == "interfaces" ) { |
107 | // we can safely call from here since device item is deeper | 110 | // we can safely call from here since device item is deeper |
108 | if( Data.UseDHCP ) { | 111 | if( Data.UseDHCP ) { |
109 | S << "iface " << NIC << "-c" << connection()->number() << | 112 | S << "iface " << NIC << "-c" << connection()->number() << |
110 | "-allowed inet dhcp" << endl; | 113 | "-allowed inet dhcp" << endl; |
111 | S << " up echo \"" << NIC << "\" > /tmp/profile-" << connection()->number() << | 114 | S << " up echo \"" << NIC << "\" > /tmp/profile-" << connection()->number() << |
112 | ".up" << Data.IPAddress << endl; | 115 | ".up" << Data.IPAddress << endl; |
113 | if( Data.SendHostname ) { | 116 | if( Data.SendHostname ) { |
114 | S << " hostname "<< Data.Hostname << endl; | 117 | S << " hostname "<< Data.Hostname << endl; |
115 | } | 118 | } |
116 | 119 | ||