Skip to content

Commit

Permalink
Adds Suse detection, which fixes sshd restart problem when Password C…
Browse files Browse the repository at this point in the history
…hange in portal (#1627)
  • Loading branch information
fede2cr committed Dec 5, 2022
1 parent 3eddff4 commit d1a36b8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Utils/distroutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def get_my_distro(config):
if re.search("freebsd", os_name, re.IGNORECASE):
# FreeBSD
return FreeBSDDistro(config)
if re.search("sles", os_name, re.IGNORECASE):
# SuSE
return SuSEDistro(config)
return GenericDistro(config)


Expand Down Expand Up @@ -512,3 +515,10 @@ def create_account(self, user, password, expiration, thumbprint):

def delete_account(self, user):
ext_utils.run(['/sbin/usermod', user, '-G', ''])


class SuSEDistro(GenericDistro):
def __init__(self, config):
super(SuSEDistro, self).__init__(config)
self.ssh_service_name = 'sshd'
self.distro_name = "SuSE"

0 comments on commit d1a36b8

Please sign in to comment.