1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-20 18:50:17 +03:00

Added check for /etc/local-policy path for gpupdate

This commit is contained in:
Игорь Чудов 2020-04-14 16:07:32 +04:00
parent 2571e27235
commit 4e8888086f
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -17,13 +17,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pathlib
import os
def default_policy_path():
'''
Returns path pointing to Default Policy directory.
'''
return pathlib.Path('/usr/share/local-policy/default')
local_policy_default = '/usr/share/local-policy/default'
etc_local_policy_default = '/etc/local-policy/active'
result_path = pathlib.Path(local_policy_default)
if os.path.exists(etc_local_policy_default):
result_path = pathlib.Path(etc_local_policy_default)
return pathlib.Path(result_path)
def cache_dir():