Commit ca85bcb7 authored by Natanael Copa's avatar Natanael Copa
Browse files

url: try wget from $PATH first and fallback to busybox wget

If GNU wget is available, then we want use it as it gives the user
possibility to set misc options, such as bandwidth limit in wgetrc.

It might also be that busybox is not available in case bootstrapping
alpine from other distros (think debian vserver host creating an
alpine guest)

In any case we, fall back to busybox wget in case wget libs are getting
upgraded. (see
parent 1c6ab679
......@@ -70,6 +70,10 @@ static int fork_wget(const char *url, pid_t *ppid)
dup2(open("/dev/null", O_RDONLY), STDIN_FILENO);
dup2(fds[1], STDOUT_FILENO);
execlp("wget", "wget", "-q", "-O", "-", url, NULL);
/* fall back to busybox wget
* See
execlp("busybox", "wget", "-q", "-O", "-", url, NULL);
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