From: Max Date: Sat, 6 Feb 2021 19:13:15 +0000 (+0100) Subject: network: Add error message if iw couldn't be found X-Git-Tag: lxc-5.0.0~295^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ed79f452a0e22ed4e20c34a4d5f16ef0a2ca50d;p=thirdparty%2Flxc.git network: Add error message if iw couldn't be found When iw is not installed on the host, lxc fails to move wireless devices into a container. Unfortunately there is no real error message yet (other than that it didn't work), so its quite unobvious what causes this. This commit adds a error message that clearly states the application iw is missing. Signed-off-by: Maximilian Blenk --- diff --git a/src/lxc/network.c b/src/lxc/network.c index 7542521ff..005a21f70 100644 --- a/src/lxc/network.c +++ b/src/lxc/network.c @@ -1553,8 +1553,10 @@ int lxc_netdev_move_wlan(char *physname, const char *ifname, pid_t pid, * the 80211 module, so for now just call out to iw. */ cmd = on_path("iw", NULL); - if (!cmd) + if (!cmd) { + ERROR("Couldn't find the application iw in PATH"); return -1; + } fpid = fork(); if (fpid < 0)