readme 추가
This commit is contained in:
parent
81fd9bb9cf
commit
91e1330bde
|
@ -0,0 +1,24 @@
|
|||
# init-wrapper
|
||||
It performs the same operation as the shell at the bottom.
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
mount --make-private /
|
||||
mount -t tmpfs -o lazytime,relatime,nodev,nosuid parentfs /run
|
||||
mkdir -p /run/overlay
|
||||
mkdir -p /run/overlay/lower
|
||||
mkdir -p /run/overlay/upper
|
||||
mkdir -p /run/overlay/work
|
||||
mkdir -p /run/overlay/merged
|
||||
mount -o bind / /run/overlay/lower
|
||||
mount -t overlay -o rw,relatime,lowerdir=/run/overlay/lower,upperdir=/run/overlay/upper,workdir=/run/overlay/work,redirect_dir=on,uuid=on,metacopy=on,volatile rootfs /run/overlay/merged
|
||||
mkdir -p /run/overlay/merged/oldroot
|
||||
pivot_root /run/overlay/merged /run/overlay/merged/oldroot
|
||||
cd /
|
||||
mount --move /oldroot/run /run
|
||||
umount -l /oldroot
|
||||
rmdir /oldroot
|
||||
rmdir /run/overlay/merged
|
||||
exec /sbin/init
|
||||
```
|
Loading…
Reference in New Issue