]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4073] Make Hammer work on Debian 13
authorAndrei Pavel <andrei@isc.org>
Thu, 28 Aug 2025 08:00:11 +0000 (11:00 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 4 Sep 2025 07:53:07 +0000 (10:53 +0300)
hammer.py

index 5394616ea0b79763b35e6043a5244620a88c8654..32ecb56e48289a7ce86ae895568c8367eb96da4d 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -102,6 +102,7 @@ SYSTEMS = {
         '10': False,
         '11': True,
         '12': True,
+        '13': True,
     },
     'freebsd': {
         '11.2': False,
@@ -1536,7 +1537,7 @@ def _enable_postgresql(system):
     else:
         # Disable all PostgreSQL services first to avoid conflicts.
         # raise_error=False for when there are no matches
-        _, output = execute("systemctl list-unit-files | grep postgres | grep -Fv '@.service' | cut -d ' ' -f 1",
+        _, output = execute("sudo systemctl list-unit-files | grep postgres | grep -Fv '@.service' | cut -d ' ' -f 1",
                             capture=True, raise_error=False)
         for service in output.split():
             execute(f'sudo systemctl disable {service}')
@@ -1554,7 +1555,7 @@ def _restart_postgresql(system):
     else:
         # Stop all PostgreSQL services first to avoid conflicts.
         # raise_error=False for when there are no matches
-        _, output = execute("systemctl list-unit-files | grep postgres | grep -Fv '@.service' | cut -d ' ' -f 1",
+        _, output = execute("sudo systemctl list-unit-files | grep postgres | grep -Fv '@.service' | cut -d ' ' -f 1",
                             capture=True, raise_error=False)
         for service in output.split():
             execute(f'sudo systemctl stop {service}')