From 1be76ec2915a18f82a17198da3852fe5d6a66ced Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Tue, 27 Nov 2018 10:21:51 +0100 Subject: [PATCH] file: update attributes for lsattr and chattr --- salt/modules/file.py | 8 ++++---- salt/states/file.py | 2 +- salt/states/netconfig.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/salt/modules/file.py b/salt/modules/file.py index 81effe00b072..1c8d1d3b1021 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -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 @@ -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) @@ -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'] diff --git a/salt/states/file.py b/salt/states/file.py index 9ab68325ff1b..ff5de5067a93 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -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. diff --git a/salt/states/netconfig.py b/salt/states/netconfig.py index 5b94f04343a9..01ae19e3b18a 100644 --- a/salt/states/netconfig.py +++ b/salt/states/netconfig.py @@ -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.