mkdir -p "$OCI/rootfs/opt/var"
mkdir -p "$OCI/rootfs/opt/readonly"
+if [[ -e /proc/kcore ]]; then
+ HAVE_PROC_KCORE=1
+else
+ HAVE_PROC_KCORE=0
+fi
+
# Let's start with a simple config
cat >"$OCI/config.json" <<EOF
{
[[ "\$(stat -c '%t:%T' "$DEV")" == 4:2 ]]
# Linux - maskedPaths
-test -e /proc/kcore
-cat /proc/kcore && exit 1
+if [[ "$HAVE_PROC_KCORE" == 1 ]]; then
+ test -e /proc/kcore
+ cat /proc/kcore && exit 1
+else
+ test ! -e /proc/kcore
+fi
test ! -e /root/nonexistent
# Linux - readonlyPaths