From 515deb31bbae2dc42271b50ee8978fc78942bb4e Mon Sep 17 00:00:00 2001 From: guillaume pernot Date: Thu, 23 Oct 2025 15:00:51 +0200 Subject: [PATCH] fix: set_locale on debian 13 Fixes #68425 --- salt/modules/localemod.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/modules/localemod.py b/salt/modules/localemod.py index 636f6d0db973..8455990a5b4d 100644 --- a/salt/modules/localemod.py +++ b/salt/modules/localemod.py @@ -194,9 +194,11 @@ def set_locale(locale): salt '*' locale.set_locale 'en_US.UTF-8' """ lc_ctl = salt.utils.systemd.booted(__context__) - # localectl on SLE12 is installed but the integration is broken -- config is rewritten by YaST2 if lc_ctl and not ( + # localectl on SLE12 is installed but the integration is broken -- config is rewritten by YaST2 __grains__["os_family"] in ["Suse"] and __grains__["osmajorrelease"] in [12] + # starting from Debian 13, update-locale must be used instead of localectl set-locale + or __grains__["os_family"] in ["Debian"] and __grains__["osmajorrelease"] >= 13 ): return _localectl_set(locale)