Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file: update attributes for lsattr and chattr #50607

Merged
merged 1 commit into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions salt/modules/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def lsattr(path):
for line in result.splitlines():
if not line.startswith('lsattr: '):
vals = line.split(None, 1)
results[vals[1]] = re.findall(r"[acdijstuADST]", vals[0])
results[vals[1]] = re.findall(r"[aAcCdDeijPsStTu]", vals[0])

return results

Expand All @@ -587,8 +587,8 @@ def chattr(*files, **kwargs):
should be added or removed from files

attributes
One or more of the following characters: ``acdijstuADST``, representing
attributes to add to/remove from files
One or more of the following characters: ``aAcCdDeijPsStTu``,
representing attributes to add to/remove from files

version
a version number to assign to the file(s)
Expand All @@ -613,7 +613,7 @@ def chattr(*files, **kwargs):
raise SaltInvocationError(
"Need an operator: 'add' or 'remove' to modify attributes.")
if attributes is None:
raise SaltInvocationError("Need attributes: [AacDdijsTtSu]")
raise SaltInvocationError("Need attributes: [aAcCdDeijPsStTu]")

cmd = ['chattr']

Expand Down
2 changes: 1 addition & 1 deletion salt/states/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,7 @@ def managed(name,
attrs
The attributes to have on this file, e.g. ``a``, ``i``. The attributes
can be any or a combination of the following characters:
``acdijstuADST``.
``aAcCdDeijPsStTu``.

.. note::
This option is **not** supported on Windows.
Expand Down
2 changes: 1 addition & 1 deletion salt/states/netconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def saved(name,
attrs
The attributes to have on this file, e.g. ``a``, ``i``. The attributes
can be any or a combination of the following characters:
``acdijstuADST``.
``aAcCdDeijPsStTu``.

.. note::
This option is **not** supported on Windows.
Expand Down