summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/network/network_NNI.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/network/network_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/network/network_NNI.cpp7
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
93QString ANetwork::acceptable( void ) { 93QString ANetwork::acceptable( void ) {
94 return ( GUI ) ? GUI->acceptable( ) : QString(); 94 return ( GUI ) ? GUI->acceptable( ) : QString();
95} 95}
96 96
97void ANetwork::commit( void ) { 97void 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
102bool ANetwork::hasDataFor( const QString & S ) {
103 return S == "interfaces";
104}
105
102bool ANetwork::generateDataForCommonFile( SystemFile & S, long DevNr ) { 106bool 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