linux_admin 0.20.1 → 0.20.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 240b0baea726bc113ca89c4a78ed25d2f06c9c1f
|
4
|
+
data.tar.gz: 5bcd12e1c68a8064333cdd9011f3865cf89903d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f942262c0ae1ca0af9aacb5e086e608315727ded48f98603b0eaf58babca22475cacb4bf9f32011842739dcb0c906540df2a7210965c3086f31e322a6afbd7a9
|
7
|
+
data.tar.gz: 66a172e7922773b836f7fa2642fd0885147522f98ecd7fca9e1b864563f94198d78a514b6c395effe6b4e1b4d0437eaf143f188cc73465cf437cd4e85796ea1e
|
@@ -45,7 +45,6 @@ module LinuxAdmin
|
|
45
45
|
# @raise ArgumentError if the address is not formatted properly
|
46
46
|
def address6=(address)
|
47
47
|
validate_ip(address)
|
48
|
-
@interface_config['BOOTPROTO'] = 'static'
|
49
48
|
@interface_config['IPV6INIT'] = 'yes'
|
50
49
|
@interface_config['DHCPV6C'] = 'no'
|
51
50
|
@interface_config['IPV6ADDR'] = address
|
@@ -162,7 +161,14 @@ module LinuxAdmin
|
|
162
161
|
def save
|
163
162
|
old_contents = File.read(@interface_file)
|
164
163
|
|
165
|
-
|
164
|
+
stop_success = stop
|
165
|
+
# Stop twice because when configure both ipv4 and ipv6 as dhcp, ipv6 dhcp client will
|
166
|
+
# exit and leave a /var/run/dhclient6-eth0.pid file. Then stop (ifdown eth0) will try
|
167
|
+
# to kill this exited process so it returns 1. In the second call, this `.pid' file
|
168
|
+
# has been deleted and ifdown returns 0.
|
169
|
+
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1472396
|
170
|
+
stop_success = stop unless stop_success
|
171
|
+
return false unless stop_success
|
166
172
|
|
167
173
|
File.write(@interface_file, @interface_config.delete_blanks.collect { |k, v| "#{k}=#{v}" }.join("\n"))
|
168
174
|
|
data/lib/linux_admin/version.rb
CHANGED
@@ -106,7 +106,6 @@ EOF
|
|
106
106
|
dhcp_interface.address6 = address
|
107
107
|
conf = dhcp_interface.interface_config
|
108
108
|
expect(conf['IPV6ADDR']).to eq(address)
|
109
|
-
expect(conf['BOOTPROTO']).to eq('static')
|
110
109
|
expect(conf['IPV6INIT']).to eq('yes')
|
111
110
|
expect(conf['DHCPV6C']).to eq('no')
|
112
111
|
end
|
@@ -241,8 +240,7 @@ EOF
|
|
241
240
|
expect(dhcp_interface).to receive(:save)
|
242
241
|
dhcp_interface.apply_static6('d:e:a:d:b:e:e:f', 127, 'd:e:a:d::/64', ['d:e:a:d::'])
|
243
242
|
conf = dhcp_interface.interface_config
|
244
|
-
expect(conf).to include('
|
245
|
-
'IPV6ADDR' => 'd:e:a:d:b:e:e:f/127', 'IPV6_DEFAULTGW' => 'd:e:a:d::/64')
|
243
|
+
expect(conf).to include('IPV6INIT' => 'yes', 'DHCPV6C' => 'no', 'IPV6ADDR' => 'd:e:a:d:b:e:e:f/127', 'IPV6_DEFAULTGW' => 'd:e:a:d::/64')
|
246
244
|
end
|
247
245
|
end
|
248
246
|
|
@@ -271,7 +269,7 @@ EOF
|
|
271
269
|
|
272
270
|
it "returns false when the interface cannot be brought down" do
|
273
271
|
expect(File).to receive(:read).with(iface_file)
|
274
|
-
expect(dhcp_interface).to receive(:stop).and_return(false)
|
272
|
+
expect(dhcp_interface).to receive(:stop).twice.and_return(false)
|
275
273
|
expect(File).not_to receive(:write)
|
276
274
|
expect(dhcp_interface.save).to be false
|
277
275
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linux_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Dunne
|
@@ -17,10 +17,11 @@ authors:
|
|
17
17
|
- Alon Goldboim
|
18
18
|
- Šimon Lukašík
|
19
19
|
- Joe VLcek
|
20
|
+
- Bo Yao
|
20
21
|
autorequire:
|
21
22
|
bindir: bin
|
22
23
|
cert_chain: []
|
23
|
-
date: 2017-
|
24
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
24
25
|
dependencies:
|
25
26
|
- !ruby/object:Gem::Dependency
|
26
27
|
name: bundler
|
@@ -195,6 +196,7 @@ email:
|
|
195
196
|
- alongoldboim@gmail.com
|
196
197
|
- isimluk@fedoraproject.org
|
197
198
|
- jvlcek@redhat.com
|
199
|
+
- boyao@redhat.com
|
198
200
|
executables: []
|
199
201
|
extensions: []
|
200
202
|
extra_rdoc_files: []
|