From 0ed79f452a0e22ed4e20c34a4d5f16ef0a2ca50d Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 6 Feb 2021 20:13:15 +0100 Subject: [PATCH] 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 --- src/lxc/network.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.47.2