Closed chantra closed 1 year ago
it is a busybox issue.
root@(none) /]# busybox sh
/ # [[ -z $(/bin/mount -t devtmpfs) ]]
sh: on: unknown operand
/ # [[ -a /dev/fd ]]
sh: /dev/fd: unknown operand
sh:
[root@(none) /]# sh
sh-5.1# [[ -z $(/bin/mount -t devtmpfs) ]]
sh-5.1# [[ -a /dev/fd ]]
It seems the problem is that if the shell invoking out init script is busybox, /bin/sh will be the one from busybox, which has the limitation.
[root@(none) /]# readlink "/proc/$$/exe"
/usr/bin/bash
[root@(none) /]# busybox sh
/ # readlink "/proc/$$/exe"
/usr/bin/busybox
/ # sh
/ # readlink "/proc/$$/exe"
/usr/bin/busybox
/ # bash
[root@(none) /]# readlink "/proc/$$/exe"
/usr/bin/bash
solution is to wrap the command substitution in quotes, and replace -a with -e...
so.... I have a solution for this, but this is currently blocked on #55
The checks seem valid yes, when the vm starts we get this error in the logs (see https://github.com/kernel-patches/bpf/actions/runs/3303109637/jobs/5450787223#step:6:425)