Unverified Commit 06151d4a by Max Committed by Christian Brauner

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: 's avatarMaximilian Blenk <blenkmax@gmail.com>
parent 41e9f73c
......@@ -1237,8 +1237,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment