summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/network/network_NNI.cpp
authorwimpie <wimpie>2004-04-05 01:13:11 (UTC)
committer wimpie <wimpie>2004-04-05 01:13:11 (UTC)
commit6be3d148fc1d610ebfa193012657b3b77d9368e3 (patch) (unidiff)
treed7bbd308d17ffe7557c7749776f4945e499d7c10 /noncore/settings/networksettings2/network/network_NNI.cpp
parentb0ceb8843ebe9ee3054faa98f08bd255df955aa3 (diff)
downloadopie-6be3d148fc1d610ebfa193012657b3b77d9368e3.zip
opie-6be3d148fc1d610ebfa193012657b3b77d9368e3.tar.gz
opie-6be3d148fc1d610ebfa193012657b3b77d9368e3.tar.bz2
For usb this seems to be working
Also for non-root users (requires using SUDO)
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.cpp47
1 files changed, 34 insertions, 13 deletions
diff --git a/noncore/settings/networksettings2/network/network_NNI.cpp b/noncore/settings/networksettings2/network/network_NNI.cpp
index 054385a..3e368a2 100644
--- a/noncore/settings/networksettings2/network/network_NNI.cpp
+++ b/noncore/settings/networksettings2/network/network_NNI.cpp
@@ -111,19 +111,40 @@ bool ANetwork::generateDataForCommonFile( SystemFile & S, long DevNr ) {
111 if( Data.UseDHCP ) { 111 if( Data.UseDHCP ) {
112 S << "iface " << NIC << "-c" << connection()->number() << 112 S << "iface "
113 "-allowed inet dhcp" << endl; 113 << NIC
114 S << " up echo \"" << NIC << "\" > /tmp/profile-" << connection()->number() << 114 << "-c"
115 ".up" << Data.IPAddress << endl; 115 << connection()->number()
116 << "-allowed inet dhcp"
117 << endl;
118 S << " up echo \""
119 << NIC
120 << "\" > /tmp/profile-"
121 << connection()->number()
122 << ".up"
123 << endl;
116 if( Data.SendHostname ) { 124 if( Data.SendHostname ) {
117 S << " hostname "<< Data.Hostname << endl; 125 S << " hostname "
126 << Data.Hostname
127 << endl;
118 } 128 }
119 129
120 S << " down rm -f /tmp/profile-" << connection()->number() << 130 S << " down rm -f /tmp/profile-"
121 ".up" << Data.IPAddress << endl; 131 << connection()->number()
132 << ".up"
133 << endl;
122 } else { 134 } else {
123 S << "iface " << NIC << "-c" << connection()->number() << 135 S << "iface "
124 "-allowed inet static" << endl; 136 << NIC << "-c"
125 S << " up echo \"" << NIC << "\" > /tmp/profile-" << connection()->number() << 137 << connection()->number()
126 ".up" << Data.IPAddress << endl; 138 << "-allowed inet static"
127 S << " down rm -f /tmp/profile-" << connection()->number() << 139 << endl;
128 ".up" << Data.IPAddress << endl; 140 S << " up echo \""
141 << NIC
142 << "\" > /tmp/profile-"
143 << connection()->number()
144 << ".up"
145 << endl;
146 S << " down rm -f /tmp/profile-"
147 << connection()->number()
148 << ".up"
149 << endl;
129 S << " address " << Data.IPAddress << endl; 150 S << " address " << Data.IPAddress << endl;