]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "Preset user units on first boot as well"
authorLennart Poettering <lennart@poettering.net>
Mon, 23 Sep 2024 09:30:22 +0000 (11:30 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 1 Oct 2024 15:33:44 +0000 (17:33 +0200)
This reverts commit 0a40325573b91ea71070653865f7f6a9cada2bef.

NEWS
src/core/manager.c

diff --git a/NEWS b/NEWS
index 408a60ddf7b0b38bf9d7ea293677aa635b3f2354..f368703c904881ac8cc15857286211b3d9d7272a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -78,9 +78,6 @@ CHANGES WITH 257 in spe:
 
         Service and system management:
 
-        * Global user units are now enabled or disabled based on preset files
-          on first boot as well just like system units are already.
-
         * Environment variable $REMOTE_ADDR is now set when using socket
           activation for AF_UNIX sockets.
 
index 844a91b605e458bc57baec888a8644c53d640576..2dddc797222686472135417ebee221bd6e121869 100644 (file)
@@ -1936,16 +1936,12 @@ static void manager_preset_all(Manager *m) {
         UnitFilePresetMode mode =
                 ENABLE_FIRST_BOOT_FULL_PRESET ? UNIT_FILE_PRESET_FULL : UNIT_FILE_PRESET_ENABLE_ONLY;
 
-        RuntimeScope scope;
-
-        FOREACH_ARGUMENT(scope, RUNTIME_SCOPE_SYSTEM, RUNTIME_SCOPE_GLOBAL) {
-                r = unit_file_preset_all(scope, 0, NULL, mode, NULL, 0);
-                if (r < 0)
-                        log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r,
-                                       "Failed to populate /etc with %s preset unit settings, ignoring: %m", runtime_scope_to_string(scope));
-                else
-                        log_info("Populated /etc with %s preset unit settings.", runtime_scope_to_string(scope));
-        }
+        r = unit_file_preset_all(RUNTIME_SCOPE_SYSTEM, 0, NULL, mode, NULL, 0);
+        if (r < 0)
+                log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r,
+                               "Failed to populate /etc with preset unit settings, ignoring: %m");
+        else
+                log_info("Populated /etc with preset unit settings.");
 }
 
 static void manager_ready(Manager *m) {