Skip to content

Commit

Permalink
Install sssd-polkit-rules in RHEL-10
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgePantelakis committed Jul 23, 2024
1 parent fb7c1de commit ef8cfe2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions SCAutolib/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def setup_system(self, install_missing: bool, gdm: bool, graphical: bool):
for u in self.lib_conf["users"]]):
packages += self._general_steps_for_ipa()

# In RHEL-10 we need one extra policy for the pcsc-lite to work
if isDistro(['rhel', 'centos'], version='10'):
packages += ["sssd-polkit-rules"]

# Check for installed packages
missing = _check_packages(packages)
if install_missing and missing:
Expand Down
8 changes: 4 additions & 4 deletions SCAutolib/isDistro.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
from typing import Union


def isDistro(oses: Union[str, list], version: str = None) -> bool:
def isDistro(OSes: Union[str, list], version: str = None) -> bool:
cur_id = distro.id().lower()
cur_name = distro.name().lower()

if isinstance(oses, str):
results = (oses in cur_id) or (oses in cur_name)
if isinstance(OSes, str):
results = (OSes in cur_id) or (OSes in cur_name)
else:
results = False
for item in oses:
for item in OSes:
if not isinstance(item, str):
continue
item = item.lower()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

setup(
name="SCAutolib",
version="3.3.2",
version="3.3.3",
description=description,
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit ef8cfe2

Please sign in to comment.