specinfra 2.50.0 → 2.50.1
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: f6c880f24b6ae0c53598ddc4408f4370522aba84
|
4
|
+
data.tar.gz: 9420ee0b8f5dbf9a398611ac49df0488e99d30eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a086e4ae7c8b62a860ccd068bd8c51161b5a5fb9be6927999fa6a95290d5e473082c425bf34c10e533d1d550290f8537e712e8dfef04836e62bf83655241f6d
|
7
|
+
data.tar.gz: 49081faa4f25bade03217d3aa098f8660319f84b7678510f48dfabba53b89373e6dc5a2baf13609663c3f149d6ae11c05f44848e5497a834d50883386eafbda4
|
@@ -3,9 +3,8 @@ class Specinfra::Command::Freebsd::Base::Service < Specinfra::Command::Base::Ser
|
|
3
3
|
def check_is_enabled(service, level=3)
|
4
4
|
"service -e | grep -- #{escape(service)}"
|
5
5
|
end
|
6
|
-
|
7
|
-
|
8
|
-
"svstat /var/service/#{escape(service)} | grep -E 'up \\(pid [0-9]+\\)'"
|
6
|
+
def check_is_running_under_init(service)
|
7
|
+
"service #{escape(service)} status | grep -E 'as \\(pid [0-9]+\\)'"
|
9
8
|
end
|
10
9
|
end
|
11
10
|
end
|
@@ -9,12 +9,50 @@ class Specinfra::Command::Freebsd::Base::User < Specinfra::Command::Base::User
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def get_minimum_days_between_password_change(user)
|
12
|
-
"0"
|
12
|
+
"echo 0"
|
13
13
|
end
|
14
14
|
|
15
15
|
def get_maximum_days_between_password_change(user)
|
16
16
|
"pw usershow -n #{escape(user)} | cut -d':' -f 6"
|
17
17
|
end
|
18
18
|
|
19
|
+
def update_home_directory(user, directory)
|
20
|
+
"pw user mod #{escape(user)} -d #{escape(directory)}"
|
21
|
+
end
|
22
|
+
|
23
|
+
def update_login_shell(user, shell)
|
24
|
+
"pw user mod #{escape(user)} -s #{escape(shell)}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def update_uid(user, uid)
|
28
|
+
"pw user mod #{escape(user)} -u #{escape(uid)}"
|
29
|
+
end
|
30
|
+
|
31
|
+
def update_gid(user, gid)
|
32
|
+
"pw user mod #{escape(user)} -g #{escape(gid)}"
|
33
|
+
end
|
34
|
+
|
35
|
+
def add(user, options)
|
36
|
+
if options[:password] then
|
37
|
+
command = ['echo',"\'#{escape(options[:password])}\'",'|','pw','user','add',escape(user),'-H','0']
|
38
|
+
else
|
39
|
+
command = ['pw','user','add',escape(user)]
|
40
|
+
end
|
41
|
+
command << '-g' << escape(options[:gid]) if options[:gid]
|
42
|
+
command << '-d' << escape(options[:home_directory]) if options[:home_directory]
|
43
|
+
command << '-s' << escape(options[:shell]) if options[:shell]
|
44
|
+
command << '-m' if options[:create_home]
|
45
|
+
command << '-r' if options[:system_user]
|
46
|
+
command << '-u' << escape(options[:uid]) if options[:uid]
|
47
|
+
command.join(' ')
|
48
|
+
end
|
49
|
+
|
50
|
+
def update_encrypted_password(user, encrypted_password)
|
51
|
+
"echo \'#{escape(encrypted_password)}\' | sudo pw user mod #{escape(user)} -H 0"
|
52
|
+
end
|
53
|
+
|
54
|
+
def get_encrypted_password(user)
|
55
|
+
"getent passwd #{escape(user)} | awk -F: '{ print $2 }'"
|
56
|
+
end
|
19
57
|
end
|
20
58
|
end
|
data/lib/specinfra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.50.
|
4
|
+
version: 2.50.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|