mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-09 10:49:54 +00:00
Switch runc and containerd startup to be entirely Go
At present they use a small shared function called "prepare" that does the read-write remounts, that I will switch to doing overlay mounts soon. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
@@ -99,7 +99,7 @@ ip route add 127.0.0.0/8 dev lo scope host
|
||||
ip link set lo up
|
||||
|
||||
# for containerizing dhcpcd and other containers that need writable /etc/resolv.conf
|
||||
[ -L /etc/resolv.conf ] && mkdir -p $(dirname $(readlink -n /etc/resolv.conf))
|
||||
[ -L /etc/resolv.conf ] && mkdir -p $(dirname $(readlink -n /etc/resolv.conf)) && touch /etc/resolv.conf
|
||||
|
||||
# remount rootfs as readonly
|
||||
mount -o remount,ro /
|
||||
@@ -117,7 +117,7 @@ ulimit -n 1048576
|
||||
ulimit -p unlimited
|
||||
|
||||
# execute other init processes
|
||||
INITS="$(find /etc/init.d -type f 2>/dev/null | sort)"
|
||||
INITS="$(find /etc/init.d ! -type d 2>/dev/null | sort)"
|
||||
for f in $INITS
|
||||
do
|
||||
$f
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# execute other shutdown processes
|
||||
SHUTS="$(find /etc/shutdown.d -type f 2>/dev/null | sort)"
|
||||
SHUTS="$(find /etc/shutdown.d ! -type d 2>/dev/null | sort)"
|
||||
for f in $SHUTS
|
||||
do
|
||||
$f
|
||||
|
Reference in New Issue
Block a user