summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2017-07-04 18:10:40 +0200
committerSven Eden <yamakuzure@gmx.net>2017-07-05 08:51:07 +0200
commitd77d27f4ca2945f88343fbe72ed0bf1236ad2aa6 (patch)
tree1520442d76a72f0e11e137525e554b05c4703cdd /src/basic
parentd039bb6e747bf119406f28a63fac10b7970260b7 (diff)
Prep v232: Do not listen to SYSTEMD_* environment variables to override things.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/cgroup-util.c7
-rw-r--r--src/basic/cgroup-util.h2
-rw-r--r--src/basic/terminal-util.c2
-rw-r--r--src/basic/virt.c2
4 files changed, 10 insertions, 3 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 64220ac08..9dd93d00b 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -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
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
index 27ab8d693..3b6319245 100644
--- a/src/basic/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -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_;
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index efd35cd72..d29dcd5be 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -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();
}
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 7a2b9e9bd..06fe509f7 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -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)