Class: Amnesie::Persist::Iwd
- Inherits:
-
Object
- Object
- Amnesie::Persist::Iwd
- Defined in:
- lib/amnesie/persist/iwd.rb
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize ⇒ Iwd
constructor
A new instance of Iwd.
Constructor Details
#initialize ⇒ Iwd
Returns a new instance of Iwd.
7 8 9 10 |
# File 'lib/amnesie/persist/iwd.rb', line 7 def initialize @tmp = Tempfile.new("main.conf") apply end |
Instance Method Details
#apply ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/amnesie/persist/iwd.rb', line 12 def apply File.write(@tmp, iwd_conf) if ! File.exist? "/etc/iwd/main.conf" || ! grep?("/etc/iwd/main.conf", /AddressRandomization/) puts "Add iwd/main.conf" Nito::Cp.new(@tmp.path, "/etc/iwd/main.conf") else puts "MAC random on iwd seem enable." end end |