From eac6604a83bef6699ef88a2e273af8a5ff1a1b0d Mon Sep 17 00:00:00 2001 From: stump Date: Thu, 3 Dec 2020 21:54:07 -0500 Subject: [PATCH] linux-v4l2: Fix bashism in v4l2loopback module detection When /bin/sh isn't bash, the previous line always appears to succeed, and modinfo's output is not redirected, because it actually runs modinfo in the background (which always succeeds) then opens and closes /dev/null without doing anything to it. This causes us to always think that the v4l2loopback module is installed, even when it isn't. --- plugins/linux-v4l2/linux-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/linux-v4l2/linux-v4l2.c b/plugins/linux-v4l2/linux-v4l2.c index 5c863049..0df54450 100644 --- a/plugins/linux-v4l2/linux-v4l2.c +++ b/plugins/linux-v4l2/linux-v4l2.c @@ -31,7 +31,7 @@ static bool v4l2loopback_installed() { bool loaded = false; - int ret = system("modinfo v4l2loopback &>/dev/null"); + int ret = system("modinfo v4l2loopback >/dev/null 2>&1"); if (ret == 0) loaded = true; -- GitLab