summaryrefslogtreecommitdiff
path: root/src/basic/virt.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2020-04-27 12:04:35 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-04-28 13:13:12 +0200
commit4096043f05b5e9e5c306ea24d34fcc4e2977e18d (patch)
tree695eefcfab54ba30879b5f355fab9c2d49606f7f /src/basic/virt.c
parent7229ec02ab3a7f498b93158b500e697838ccdd9b (diff)
downloadsystemd-4096043f05b5e9e5c306ea24d34fcc4e2977e18d.tar.gz
Revert "detect-virt: also detect "microsoft" as WSL"
WSL2 will soon (TM) include the "WSL2" string in /proc/sys/kernel/osrelease so the workaround will no longer be necessary. We have several different cloud images which do include the "microsoft" string already, which would break this detection. They are for internal usage at the moment, but the userspace side can come from all over the place so it would be quite hard to track and downstream-patch to avoid breakages. This reverts commit a2f838d59075a49b012f9b7056664f7ffeed44d2.
Diffstat (limited to 'src/basic/virt.c')
-rw-r--r--src/basic/virt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/basic/virt.c b/src/basic/virt.c
index f21a36c6fe..c6bff6b16e 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -464,12 +464,10 @@ int detect_container(void) {
goto finish;
}
- /* "Official" way of detecting WSL https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364,
- * ... and a working one, since the official one doesn't actually work ;(
- */
+ /* "Official" way of detecting WSL https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364 */
r = read_one_line_file("/proc/sys/kernel/osrelease", &o);
if (r >= 0 &&
- (strstr(o, "Microsoft") || strstr(o, "microsoft") || strstr(o, "WSL"))) {
+ (strstr(o, "Microsoft") || strstr(o, "WSL"))) {
r = VIRTUALIZATION_WSL;
goto finish;
}