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
+50
-9
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
/target
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: airup-select-default-milestone [NAME]"
|
echo "usage: airup-select-default-milestone [NAME]"
|
||||||
|
echo "Select default milestone for Airup, which is entered on system boot."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10,7 +11,9 @@ if [ "$1" = "--help" ] || [ "$1" = "-h" ] || [ -z "$1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "/share/milestones/$1.airm" ]; then
|
if [ -e "/share/milestones/$1.airm" ]; then
|
||||||
ln -sf "/share/milestones/$1.airm" "/share/milestones/default.airm"
|
unlink "/share/milestones/default.airm" 2> /dev/null
|
||||||
|
ln -sf "$1.airm" "/share/milestones/default.airm"
|
||||||
|
exit 0
|
||||||
else
|
else
|
||||||
echo "error: milestone '$1' not found"
|
echo "error: milestone '$1' not found"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
for ent in "$@"; do
|
||||||
|
export "$ent"
|
||||||
|
done
|
||||||
|
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
if [ -z "${PREFIX}" ]; then
|
if [ -z "${PREFIX}" ]; then
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
run $PREFIX/mount-basic-filesystems.sh
|
# Mount basic filesystems.
|
||||||
|
run $PREFIX/share/mount-basic-filesystems.sh
|
||||||
|
|
||||||
# Start `lxdeviced`.
|
# Start `lxdeviced`.
|
||||||
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
|
#!/bin/sh
|
||||||
|
|
||||||
mount -o remount,rw /
|
# NOTE:
|
||||||
|
# Avoid using `/dev/null` in this script, even after `/dev` is mounted.
|
||||||
umount -q /dev /sys /proc /run
|
|
||||||
|
|
||||||
mount -t tmpfs run /run
|
|
||||||
mount -t sysfs sys /sys
|
|
||||||
mount -t proc proc /proc
|
|
||||||
|
|
||||||
|
mount_dev() {
|
||||||
if grep -q devtmpfs /proc/filesystems; then
|
if grep -q devtmpfs /proc/filesystems; then
|
||||||
mount -t devtmpfs dev /dev
|
mount -t devtmpfs dev /dev
|
||||||
else
|
else
|
||||||
mount -t tmpfs dev /dev
|
mount -t tmpfs dev /dev
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
mount -o remount,rw /
|
||||||
|
|
||||||
|
mountpoint -q /dev || mount_dev
|
||||||
|
mountpoint -q /sys || mount -t sysfs sys /sys
|
||||||
|
mountpoint -q /proc || mount -t proc proc /proc
|
||||||
|
|
||||||
|
mountpoint -q /tmp || mount -t tmpfs tmp /tmp
|
||||||
|
|
||||||
|
# /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