mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 19:52:52 +00:00
Add 7.3 - prepare virtual kernel filesystems
This commit is contained in:
parent
c88a2e072b
commit
bb6fa2ee69
2 changed files with 34 additions and 0 deletions
15
scripts/chapter7/7.3-prepare-virtual-fs.sh
Normal file
15
scripts/chapter7/7.3-prepare-virtual-fs.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -pv $LFS/{dev,proc,sys,run}
|
||||
|
||||
mount -v --bind /dev $LFS/dev
|
||||
|
||||
mount -v --bind /dev/pts $LFS/dev/pts
|
||||
mount -vt proc proc $LFS/proc
|
||||
mount -vt sysfs sysfs $LFS/sys
|
||||
mount -vt tmpfs tmpfs $LFS/run
|
||||
|
||||
if [ -h $LFS/dev/shm ]; then
|
||||
mkdir -pv $LFS/$(readlink $LFS/dev/shm)
|
||||
fi
|
||||
|
|
@ -401,3 +401,22 @@ echo "Chapter 7"
|
|||
echo "Changing ownership to root"
|
||||
su -c "bash $PWD/chapter7/7.2-changing-ownership.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter7/7.2-changing-ownership.sh"
|
||||
fi
|
||||
|
||||
# Chapter 7.3
|
||||
# ===========
|
||||
echo "Preparing virtual kernel filesystems"
|
||||
su -c "bash $PWD/chapter7/7.3-prepare-virtual-fs.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter7/7.3-prepare-virtual-fs.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue