Skip to contentSkip to conversation

busybox: fix installation from /sbin/busybox

PATCH In review Daniel Drake 2 participants 2 messages Sep 25, 2012 – Sep 26, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 busybox: fix installation from /sbin/busybox

"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 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
modules.d/05busybox/module-setup.sh +4 -3
index 2e9ead8..e0ef178 100755
@@ -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
Signature · 1 line
1.7.11.4

A message that is not in the archive (sent off-list or not yet received): 20120925224228.25BC8FAABE-2+9YHz4BXxlLDiiyqF6/[email protected]

#2 lore raw

Am 26.09.2012 00:42, schrieb Daniel Drake:

Quoted 17 lines

"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 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
modules.d/05busybox/module-setup.sh +0 -0
index 2e9ead8..e0ef178 100755
@@ -13,9 +13,10 @@ depends() {
 }
 
 install() {

modules.d/05busybox/module-setup.sh depends() { · line 22

Quoted 10 lines
modules.d/05busybox/module-setup.sh +4 -3
-    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

Thanks! Pushed.