Rework init order again
This commit is contained in:
parent
d7ac0a9a4e
commit
4f51cb2f4f
|
|
@ -1 +0,0 @@
|
|||
# This file doesn't do anything, it's just the end of the base image init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the start of the downstream image init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the mod init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the start of the mod init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-os-end/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-os-end/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-os-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-os-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the mod init process
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if ([ -d "/config/custom-cont-init.d" ] && [ -n "$(find /config/custom-cont-init.d ! -user root)" ]); then
|
||||
echo "**** Potential tampering with custom scripts detected ****"
|
||||
randstr=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-8};echo;)
|
||||
mv "/config/custom-cont-init.d" "/config/custom-cont-init.d.${randstr}"
|
||||
echo "**** Folder /config/custom-cont-init.d is moved to /config/custom-cont-init.d.${randstr} ****"
|
||||
echo "**** The folder '/config/custom-cont-init.d' and its contents need to all be owned by root to prevent root escalation inside the container!!! ****"
|
||||
mkdir -p /config/custom-cont-init.d
|
||||
chown 0:0 /config/custom-cont-init.d
|
||||
elif ([ -d "/config/custom-cont-init.d" ] && [ -n "$(find /config/custom-cont-init.d -perm -o+w)" ]); then
|
||||
echo "**** The folder '/config/custom-cont-init.d' or some of its contents have write permissions for others, which is a security risk. ****"
|
||||
echo "**** Please review the permissions of this folder and its contents to make sure they are owned by root, and can only be modified by root. ****"
|
||||
fi
|
||||
|
|
@ -1 +0,0 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-tamper-check/run
|
||||
Loading…
Reference in a new issue