diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-28 15:31:19 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-28 15:31:19 +0000 |
commit | 16dab533e62b0c79578d2a8abc48bd021d906ae5 (patch) | |
tree | 832217179f72130cfd5b08ab52fa4beab7d3792c /debianutils | |
parent | 543b54cc575c75ef69ca172aa30179118c62cc4f (diff) | |
download | busybox-w32-16dab533e62b0c79578d2a8abc48bd021d906ae5.tar.gz busybox-w32-16dab533e62b0c79578d2a8abc48bd021d906ae5.tar.bz2 busybox-w32-16dab533e62b0c79578d2a8abc48bd021d906ae5.zip |
fix which-uses-default-path
git-svn-id: svn://busybox.net/trunk/busybox@17600 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/which.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/debianutils/which.c b/debianutils/which.c index a715a2664..79b2a4f83 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -21,6 +21,10 @@ int which_main(int argc, char **argv) | |||
21 | bb_show_usage(); | 21 | bb_show_usage(); |
22 | } | 22 | } |
23 | 23 | ||
24 | if (!getenv("PATH")) { | ||
25 | setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin", 1); | ||
26 | } | ||
27 | |||
24 | while (--argc > 0) { | 28 | while (--argc > 0) { |
25 | argv++; | 29 | argv++; |
26 | if (strchr(*argv, '/')) { | 30 | if (strchr(*argv, '/')) { |