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.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/settings/networksettings2/network/network_NNI.cpp b/noncore/settings/networksettings2/network/network_NNI.cpp index 34dac54..c183d5e 100644 --- a/noncore/settings/networksettings2/network/network_NNI.cpp +++ b/noncore/settings/networksettings2/network/network_NNI.cpp | |||
@@ -108,59 +108,59 @@ short ANetwork::generateFile( SystemFile &SF, | |||
108 | ) { | 108 | ) { |
109 | 109 | ||
110 | short rvl, rvd ; | 110 | short rvl, rvd ; |
111 | QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr ); | 111 | QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr ); |
112 | 112 | ||
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 | << "A" | 119 | << "A" |
120 | << connection()->number() | 120 | << networkSetup()->number() |
121 | << NIC | 121 | << NIC |
122 | << " inet dhcp" | 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 | << networkSetup()->number() |
128 | << ".up" | 128 | << ".up" |
129 | << endl; | 129 | << endl; |
130 | if( Data.SendHostname ) { | 130 | if( Data.SendHostname ) { |
131 | SF << " hostname " | 131 | SF << " hostname " |
132 | << Data.Hostname | 132 | << Data.Hostname |
133 | << endl; | 133 | << endl; |
134 | } | 134 | } |
135 | 135 | ||
136 | SF << " down rm -f /tmp/profile-" | 136 | SF << " down rm -f /tmp/profile-" |
137 | << connection()->number() | 137 | << networkSetup()->number() |
138 | << ".up" | 138 | << ".up" |
139 | << endl; | 139 | << endl; |
140 | } else { | 140 | } else { |
141 | SF << "iface " | 141 | SF << "iface " |
142 | << "A" | 142 | << "A" |
143 | << connection()->number() | 143 | << networkSetup()->number() |
144 | << NIC | 144 | << NIC |
145 | << " inet static" | 145 | << " inet static" |
146 | << endl; | 146 | << endl; |
147 | SF << " up echo \"" | 147 | SF << " up echo \"" |
148 | << NIC | 148 | << NIC |
149 | << "\" > /tmp/profile-" | 149 | << "\" > /tmp/profile-" |
150 | << connection()->number() | 150 | << networkSetup()->number() |
151 | << ".up" | 151 | << ".up" |
152 | << endl; | 152 | << endl; |
153 | SF << " down rm -f /tmp/profile-" | 153 | SF << " down rm -f /tmp/profile-" |
154 | << connection()->number() | 154 | << networkSetup()->number() |
155 | << ".up" | 155 | << ".up" |
156 | << endl; | 156 | << endl; |
157 | SF << " address " | 157 | SF << " address " |
158 | << Data.IPAddress | 158 | << Data.IPAddress |
159 | << endl; | 159 | << endl; |
160 | SF << " broadcast " | 160 | SF << " broadcast " |
161 | << Data.Broadcast | 161 | << Data.Broadcast |
162 | << endl; | 162 | << endl; |
163 | SF << " netmask " | 163 | SF << " netmask " |
164 | << Data.NetMask | 164 | << Data.NetMask |
165 | << endl; | 165 | << endl; |
166 | 166 | ||
@@ -202,17 +202,17 @@ short ANetwork::generateFile( SystemFile &SF, | |||
202 | } | 202 | } |
203 | for ( QStringList::Iterator it = Data.PostDown_SL.begin(); | 203 | for ( QStringList::Iterator it = Data.PostDown_SL.begin(); |
204 | it != Data.PostDown_SL.end(); | 204 | it != Data.PostDown_SL.end(); |
205 | ++it ) { | 205 | ++it ) { |
206 | SF << " post-down " | 206 | SF << " post-down " |
207 | << (*it) | 207 | << (*it) |
208 | << endl; | 208 | << endl; |
209 | } | 209 | } |
210 | rvl = 0; | 210 | rvl = 0; |
211 | } | 211 | } |
212 | 212 | ||
213 | // embed other info in it | 213 | // embed other info in it |
214 | rvd = connection()->getToplevel()->generateFileEmbedded( SF, DevNr ); | 214 | rvd = networkSetup()->getToplevel()->generateFileEmbedded( SF, DevNr ); |
215 | 215 | ||
216 | return (rvd == 2 || rvl == 2 ) ? 2 : | 216 | return (rvd == 2 || rvl == 2 ) ? 2 : |
217 | (rvd == 0 || rvl == 0 ) ? 0 : 1; | 217 | (rvd == 0 || rvl == 0 ) ? 0 : 1; |
218 | } | 218 | } |