author | wimpie <wimpie> | 2004-04-05 01:13:11 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-05 01:13:11 (UTC) |
commit | 6be3d148fc1d610ebfa193012657b3b77d9368e3 (patch) (unidiff) | |
tree | d7bbd308d17ffe7557c7749776f4945e499d7c10 /noncore/settings/networksettings2/network/network_NNI.cpp | |
parent | b0ceb8843ebe9ee3054faa98f08bd255df955aa3 (diff) | |
download | opie-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.cpp | 47 |
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 | |||
@@ -108,25 +108,46 @@ bool ANetwork::generateDataForCommonFile( SystemFile & S, long DevNr ) { | |||
108 | 108 | ||
109 | if( S.name() == "interfaces" ) { | 109 | if( S.name() == "interfaces" ) { |
110 | // we can safely call from here since device item is deeper | 110 | // we can safely call from here since device item is deeper |
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; |
130 | S << " broadcast " << Data.Broadcast << endl; | 151 | S << " broadcast " << Data.Broadcast << endl; |
131 | S << " netmask " << Data.NetMask << endl; | 152 | S << " netmask " << Data.NetMask << endl; |
132 | 153 | ||