]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
busybox: fix installation from /sbin/busybox
authorDaniel Drake <dsd@laptop.org>
Tue, 25 Sep 2012 22:42:28 +0000 (18:42 -0400)
committerHarald Hoyer <harald@redhat.com>
Wed, 26 Sep 2012 09:30:15 +0000 (11:30 +0200)
"inst busybox" no longer seems to work when busybox is at
/sbin/busybox. Reproduced on Fedora 18 (dracut-023-39.git20120910).

Use type -P to find the full path to busybox to solve this problem.

modules.d/05busybox/module-setup.sh

index 2e9ead8a4bfad864b23b862cde4c5ef1c7cee5dc..e0ef1783b5e55213b0991de2c21399b45a692009 100755 (executable)
@@ -13,9 +13,10 @@ depends() {
 }
 
 install() {
-    local _i _progs _path
-    inst busybox /usr/bin/busybox
-    for _i in `/sbin/busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}'`
+    local _i _progs _path _busybox
+    _busybox=$(type -P busybox)
+    inst $_busybox /usr/bin/busybox
+    for _i in `$_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}'`
     do
         _progs="$_progs $_i"
     done