Adds Suse detection, which fixes sshd restart problem when Password Change in portal
@@ -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)
@@ -512,3 +515,10 @@ class FedoraDistro(RedhatDistro):
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"
