dustin
/
jenkinsagent
Archived
1
0
Fork 0

initramfs: Mount proc et al. earlier

The `/proc` filesystem has to be mounted before the kernel command line
arguments can be parsed.
master
Dustin 2022-03-12 16:04:58 -06:00
parent 9d2c710be9
commit 64e47b3b9b
1 changed files with 5 additions and 5 deletions

View File

@ -2,6 +2,11 @@
export PATH=/usr/sbin:/usr/bin:/sbin:/bin export PATH=/usr/sbin:/usr/bin:/sbin:/bin
mkdir -p /proc /run /sys
mount -t sysfs sysfs /sys
mount -t proc proc /proc
mount -t tmpfs tmpfs /run
# shellcheck disable=SC2046 # shellcheck disable=SC2046
set -- $(cat /proc/cmdline) set -- $(cat /proc/cmdline)
while [ $# -ge 1 ]; do while [ $# -ge 1 ]; do
@ -15,11 +20,6 @@ while [ $# -ge 1 ]; do
shift shift
done done
mkdir -p /proc /run /sys
mount -t sysfs sysfs /sys
mount -t proc proc /proc
mount -t tmpfs tmpfs /run
for path in /sys/class/net/*; do for path in /sys/class/net/*; do
[ -e "${path}" ] || continue [ -e "${path}" ] || continue
ip link set "${path##*/}" up ip link set "${path##*/}" up