chiark / gitweb /
manager: always sort environment block, it's prettier
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Nov 2013 18:31:46 +0000 (19:31 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Nov 2013 20:12:36 +0000 (21:12 +0100)
src/core/manager.c

index dd0d83d..f2f473b 100644 (file)
@@ -397,6 +397,8 @@ static int manager_default_environment(Manager *m) {
         if (!m->environment)
                 return -ENOMEM;
 
+        strv_sort(m->environment);
+
         return 0;
 }
 
@@ -2507,7 +2509,7 @@ int manager_environment_add(Manager *m, char **minus, char **plus) {
         if (b != l)
                 strv_free(b);
 
-        m->environment = l;
+        m->environment = strv_sort(l);
         return 0;
 }