From 9142fa1aa683f5e4256fd4a2292c30208d12e086 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 13 Apr 2020 12:37:57 +0200 Subject: [PATCH] Temporary transition Docker init (#34135) --- rootfs/init | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 rootfs/init diff --git a/rootfs/init b/rootfs/init new file mode 100755 index 00000000000..7bea7ed88a9 --- /dev/null +++ b/rootfs/init @@ -0,0 +1,23 @@ +#!/bin/execlineb -S0 + +## +## load default PATH (the same that Docker includes if not provided) if it doesn't exist, +## then go ahead with stage1. +## this was motivated due to this issue: +## - https://github.com/just-containers/s6-overlay/issues/108 +## + +/bin/importas -D /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PATH PATH +export PATH ${PATH} + +## +## Skip further init if the user has a given CMD. +## This is to prevent Home Assistant from starting twice if the user +## decided to override/start via the CMD. +## + +ifelse { s6-test $# -ne 0 } +{ + $@ +} +/etc/s6/init/init-stage1 $@ \ No newline at end of file