Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
f2150b10
Commit
f2150b10
authored
Jan 03, 2014
by
rgbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On OpenBSD, make user module status 'changed' only if necessary when using 'login_class' parameter
parent
89abc35e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
library/system/user
+15
-2
No files found.
library/system/user
View file @
f2150b10
...
...
@@ -901,8 +901,21 @@ class OpenBSDUser(User):
cmd
.
append
(
self
.
shell
)
if
self
.
login_class
is
not
None
:
cmd
.
append
(
'-L'
)
cmd
.
append
(
self
.
login_class
)
# find current login class
user_login_class
=
None
userinfo_cmd
=
[
self
.
module
.
get_bin_path
(
'userinfo'
,
True
),
self
.
name
]
(
rc
,
out
,
err
)
=
self
.
execute_command
(
userinfo_cmd
)
for
line
in
out
.
splitlines
():
tokens
=
line
.
split
()
if
tokens
[
0
]
==
'class'
and
len
(
tokens
)
==
2
:
user_login_class
=
tokens
[
1
]
# act only if login_class change
if
self
.
login_class
!=
user_login_class
:
cmd
.
append
(
'-L'
)
cmd
.
append
(
self
.
login_class
)
if
self
.
update_password
==
'always'
and
self
.
password
is
not
None
and
info
[
1
]
!=
self
.
password
:
cmd
.
append
(
'-p'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment