Diffstat (limited to 'noncore/settings/networksettings2/lancard/lancard_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/lancard/lancard_NNI.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancard_NNI.cpp b/noncore/settings/networksettings2/lancard/lancard_NNI.cpp index 9595e2e..a6401db 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NNI.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NNI.cpp @@ -21,24 +21,38 @@ void ALanCard::setSpecificAttribute( QString & A, QString & V ) { void ALanCard::saveSpecificAttribute( QTextStream & TS) { TS << "matchanycard=" << ((Data.AnyLanCard) ? "yes" : "no") << endl; for( QStringList::Iterator it = Data.HWAddresses.begin(); it != Data.HWAddresses.end(); ++it ) { TS << "match=" << quote( *it ) << endl; } } QWidget * ALanCard::edit( QWidget * parent ) { GUI = new LanCardEdit( parent ); GUI->showData( Data ); return GUI; } QString ALanCard::acceptable( void ) { return ( GUI ) ? GUI->acceptable( ) : QString(); } void ALanCard::commit( void ) { if( GUI && GUI->commit( Data ) ) setModified( 1 ); } + +bool ALanCard::generateDeviceDataForCommonFile( SystemFile & S, long DevNr ) { + AsDevice * Dev = runtime()->device(); + QString NIC = Dev->genNic( DevNr ); + + if( S.name() == "interfaces" ) { + // generate mapping stanza for this interface + S << "# check if " << NIC << " can be brought UP" << endl; + S << "mapping " << NIC << endl; + S << " script networksettings2-request" << endl << endl; + } + return 0; +} + |