amnesie 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +5 -0
- data/amnesie.gemspec +1 -1
- data/lib/amnesie/process.rb +6 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81455c8939114e8211b6c21844ad35e88d0422c29be33d36cafff2ea5210bfa6
|
4
|
+
data.tar.gz: 6dcc45de41fbfbf84b3e6f4a0af45fe139af8296ce5a444ecc3e4d5997baf243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc53a51bed717b6e931d35d0a1e19ba45c8b6ee250a811ed08e5956e6f64c419167112e1329f32019b0fa0204e0b98fc8ebb9d16f368923b959d45504769591c
|
7
|
+
data.tar.gz: 4a78f282cc125ce8dd2e7248ebfa9b3126dcff206a257a04157f7d01582728944fcdf0da62638dc16e079e700055b657bad0c043eef3d175e887d610552db288
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 0.0.4, release 2020-05-16
|
2
|
+
* Debian10 need to reload ifup@card-name too
|
3
|
+
* Correct path where search dhclient (/bin,/sbin)
|
4
|
+
* Enhance stuff for kill and reload dhclient (tested on debian 10)
|
5
|
+
|
1
6
|
## 0.0.3, release 2020-05-15
|
2
7
|
* Add stuff for kill and reload dhclient (tested on debian 10)
|
3
8
|
|
data/amnesie.gemspec
CHANGED
data/lib/amnesie/process.rb
CHANGED
@@ -31,7 +31,7 @@ module Amnesie
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def kill_dhclient
|
34
|
-
return if not TTY::Which.exist?('dhclient')
|
34
|
+
return if not TTY::Which.exist?('dhclient', paths: ['/bin, /sbin'])
|
35
35
|
`pgrep -x dhclient`
|
36
36
|
@pkill.run("dhclient") if $?.success?
|
37
37
|
@rm.run("/run/dhclient.#{@card}.pid") if File.exist? "/run/dhclient.#{@card}.pid"
|
@@ -51,10 +51,14 @@ module Amnesie
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def restart_dhclient
|
54
|
-
return if not TTY::Which.exist?('dhclient')
|
54
|
+
return if not TTY::Which.exist?('dhclient', paths: ['/bin, /sbin'])
|
55
55
|
dhclient = Helpers::Exec.new("dhclient")
|
56
56
|
# command tested on debian, not try on another system yet...
|
57
57
|
dhclient.run("-4 -v -i -pf /run/dhclient.#{@card}.pid -lf /var/lib/dhcp/dhclient.#{@card}.leases -I -df /var/lib/dhcp/dhclient6.#{@card}.leases #{@card}")
|
58
|
+
if TTY::Which.exist?('systemctl')
|
59
|
+
`systemctl is-active ifup@#{@card}`
|
60
|
+
@systemctl.run("restart ifup@#{@card}") if $?.success?
|
61
|
+
end
|
58
62
|
puts "Restarted dhclient"
|
59
63
|
end
|
60
64
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|