blob: dfaf54f2a82026bf2ccb36aee09eecf851fd8a07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
printf "%b" "${GRN}Mounting virtual kernel filesystems${RST}...\n"
if ! mountpoint "${LFS}"/dev >/dev/null 2>&1; then
sudo mount --bind /dev "${LFS}"/dev
else
printf "%b" " ${IYLW}${LFS}/dev${IGRN} is already mounted${RST}\n"
fi
if ! mountpoint "${LFS}"/dev/pts >/dev/null 2>&1; then
sudo mount --bind /dev/pts "${LFS}"/dev/pts
else
printf "%b" " ${IYLW}${LFS}/dev/pts${IGRN} is already mounted${RST}\n"
fi
if ! mountpoint "${LFS}"/proc >/dev/null 2>&1; then
sudo mount -t proc proc "${LFS}"/proc
else
printf "%b" " ${IYLW}${LFS}/proc${IGRN} is already mounted${RST}\n"
fi
if ! mountpoint "${LFS}"/sys >/dev/null 2>&1; then
sudo mount -t sysfs sysfs "${LFS}"/sys
else
printf "%b" " ${IYLW}${LFS}/sys${IGRN} is already mounted${RST}\n"
fi
if ! mountpoint "${LFS}"/run >/dev/null 2>&1; then
sudo mount -t tmpfs tmpfs "${LFS}"/run
else
printf "%b" " ${IYLW}${LFS}/run${IGRN} is already mounted${RST}\n"
fi
if [[ -h "${LFS}"/dev/shm ]]; then
sudo mkdir -pv "${LFS}"/"$(readlink "${LFS}"/dev/shm)"
fi
|