SHA256
feat: fix mount-basic-filesystems bugs
Signed-off-by: sisungo <[email protected]>
This commit is contained in:
1 parent
2212875018
commit
dc93bd7c2c
7 files changed
+52
-11
No files matched your search
@@ -1,4 +1,5 @@
|
||||
run $PREFIX/mount-basic-filesystems.sh
|
||||
# Mount basic filesystems.
|
||||
run $PREFIX/share/mount-basic-filesystems.sh
|
||||
|
||||
# Start `lxdeviced`.
|
||||
start lxdeviced
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Start `accountd`.
|
||||
#
|
||||
# Running services as an user other than root depends on this, so it is run early.
|
||||
start accountd
|
||||
|
||||
# Run the logger.
|
||||
#
|
||||
# Ensuring the logger to run before other services can help us capture more system logs during system boot.
|
||||
start airup-fallback-logger
|
||||
@@ -0,0 +1,5 @@
|
||||
[milestone]
|
||||
display-name = "Container"
|
||||
description = "The milestone that is usually entered on a with-init container boot."
|
||||
dependencies = []
|
||||
kind = "serial"
|
||||
@@ -1,15 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
# NOTE:
|
||||
# Avoid using `/dev/null` in this script, even after `/dev` is mounted.
|
||||
|
||||
mount_dev() {
|
||||
if grep -q devtmpfs /proc/filesystems; then
|
||||
mount -t devtmpfs dev /dev
|
||||
else
|
||||
mount -t tmpfs dev /dev
|
||||
fi
|
||||
}
|
||||
|
||||
mount -o remount,rw /
|
||||
|
||||
umount -q /dev /sys /proc /run
|
||||
mountpoint -q /dev || mount_dev
|
||||
mountpoint -q /sys || mount -t sysfs sys /sys
|
||||
mountpoint -q /proc || mount -t proc proc /proc
|
||||
|
||||
mount -t tmpfs run /run
|
||||
mount -t sysfs sys /sys
|
||||
mount -t proc proc /proc
|
||||
mountpoint -q /tmp || mount -t tmpfs tmp /tmp
|
||||
|
||||
if grep -q devtmpfs /proc/filesystems; then
|
||||
mount -t devtmpfs dev /dev
|
||||
else
|
||||
mount -t tmpfs dev /dev
|
||||
fi
|
||||
# /run: required by Airup, and is mounted before this script run
|
||||
|
||||
mountpoint -q /dev/pts || mount --mkdir -t devpts devpts /dev/pts
|
||||
mountpoint -q /dev/shm || mount --mkdir -t tmpfs shm /dev/shm
|
||||
mountpoint -q /dev/mqueue || mount --mkdir -t mqueue mqueue /dev/mqueue
|
||||
|
||||
mountpoint -q /sys/kernel/security || mount --mkdir -t securityfs securityfs /sys/kernel/security
|
||||
mountpoint -q /sys/kernel/debug || mount --mkdir -t debugfs debugfs /sys/kernel/debug
|
||||
mountpoint -q /sys/kernel/tracing || mount --mkdir -t tracefs tracefs /sys/kernel/tracing
|
||||
mountpoint -q /sys/fs/pstore || mount --mkdir -t pstore pstore /sys/fs/pstore
|
||||
mountpoint -q /sys/fs/bpf || mount --mkdir -t bpf bpf /sys/fs/bpf
|
||||
mountpoint -q /sys/fs/cgroup || mount --mkdir -t cgroup2 -o nsdelegate cgroup2 /sys/fs/cgroup
|
||||
Reference in new issue
Block a user