Skip to contentSkip to conversation

docker: fix init script for busybox

PATCH Phil Coval 2 participants 2 messages Feb 22, 2020 – Feb 27, 2020

lore
Share & tools
lore

Phil Coval

author
#0 lore raw

Observed issue using BusyBox v1.30.1 not supporting bashism

/etc/init.d/docker.init: line 43: syntax error: unexpected redirection

Change-Id: I9f73564cfb56352fbf7d80723ea938b66eceb5c7
Forwarded: https://lists.yoctoproject.org/g/meta-virtualization

---
 recipes-containers/docker/files/docker.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker/files/docker.init +1 -1
index b37ddc9..24f8fea 100644
@@ -40,7 +40,7 @@ start() {
     if ! [ -f $pidfile ]; then
         printf "Starting $prog:\t"
         echo -e "\n$(date)\n" >> $logfile
-        "$unshare" -m -- $exec $other_args &>> $logfile &
+        "$unshare" -m -- $exec $other_args >> $logfile 2>&1 &
         pid=$!
         touch $lockfile
         # wait up to 10 seconds for the pidfile to exist.  see
Signature · 1 line
2.20.1
#1 lore raw

merged

Bruce

In message: [meta-virtualization] docker: fix init script for busybox

Quoted 29 lines · on 22/02/2020 Phil Coval wrote:

Observed issue using BusyBox v1.30.1 not supporting bashism

/etc/init.d/docker.init: line 43: syntax error: unexpected redirection

Change-Id: I9f73564cfb56352fbf7d80723ea938b66eceb5c7
Forwarded: https://lists.yoctoproject.org/g/meta-virtualization

---
 recipes-containers/docker/files/docker.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker/files/docker.init +1 -1
index b37ddc9..24f8fea 100644
@@ -40,7 +40,7 @@ start() {
     if ! [ -f $pidfile ]; then
         printf "Starting $prog:\t"
         echo -e "\n$(date)\n" >> $logfile
-        "$unshare" -m -- $exec $other_args &>> $logfile &
+        "$unshare" -m -- $exec $other_args >> $logfile 2>&1 &
         pid=$!
         touch $lockfile
         # wait up to 10 seconds for the pidfile to exist.  see
Signature · 1 line
2.20.1