chiark / gitweb /
Prep v232: Do not listen to SYSTEMD_* environment variables to override things.
authorSven Eden <yamakuzure@gmx.net>
Tue, 4 Jul 2017 16:10:40 +0000 (18:10 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:51:07 +0000 (08:51 +0200)
src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/basic/terminal-util.c
src/basic/virt.c

index 64220ac085c0cbed5c5bcb12d76258e2ec0c4402..9dd93d00b0a9d88e780e668c32bcc2b622627862 100644 (file)
@@ -2454,9 +2454,6 @@ bool cg_is_unified_wanted(void) {
 bool cg_is_legacy_wanted(void) {
         return !cg_is_unified_wanted();
 }
-#else
-bool cg_is_legacy_wanted(void) {
-        return true;
 
 bool cg_is_unified_systemd_controller_wanted(void) {
         static thread_local int wanted = -1;
@@ -2503,6 +2500,10 @@ bool cg_is_unified_systemd_controller_wanted(void) {
 bool cg_is_legacy_systemd_controller_wanted(void) {
         return cg_is_legacy_wanted() && !cg_is_unified_systemd_controller_wanted();
 }
+#else
+bool cg_is_legacy_wanted(void) {
+        return true;
+}
 #endif // 0
 
 #if 0 /// UNNEEDED by elogind
index 27ab8d6934b0db1d3102a0c37a00139e174c3ef4..3b63192459ee2469fda93cfa2bb36def3f649a08 100644 (file)
@@ -261,8 +261,10 @@ void cg_unified_flush(void);
 bool cg_is_unified_wanted(void);
 #endif // 0
 bool cg_is_legacy_wanted(void);
+#if 0 /// UNNEEDED by elogind
 bool cg_is_unified_systemd_controller_wanted(void);
 bool cg_is_legacy_systemd_controller_wanted(void);
+#endif // 0
 
 const char* cgroup_controller_to_string(CGroupController c) _const_;
 CGroupController cgroup_controller_from_string(const char *s) _pure_;
index efd35cd727cc944c166f428c113669ff97d975c6..d29dcd5bec79df79c2d677e2386bb18ed3300105 100644 (file)
@@ -1219,6 +1219,7 @@ bool colors_enabled(void) {
         static int enabled = -1;
 
         if (_unlikely_(enabled < 0)) {
+#if 0 /// elogind does not allow such forcing, and we are never init!
                 int val;
 
                 val = getenv_bool("SYSTEMD_COLORS");
@@ -1228,6 +1229,7 @@ bool colors_enabled(void) {
                         /* PID1 outputs to the console without holding it open all the time */
                         enabled = !getenv_terminal_is_dumb();
                 else
+#endif // 0
                         enabled = !terminal_is_dumb();
         }
 
index 7a2b9e9bd607b81f584818e8f53ffbe30e220404..06fe509f772ab4042b7cb5e122fabdfa2182908f 100644 (file)
@@ -561,8 +561,10 @@ int running_in_userns(void) {
 int running_in_chroot(void) {
         int ret;
 
+#if 0 /// elogind does not allow to ignore chroots, we are never init!
         if (getenv_bool("SYSTEMD_IGNORE_CHROOT") > 0)
                 return 0;
+#endif // 0
 
         ret = files_same("/proc/1/root", "/");
         if (ret < 0)