mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 19:52:52 +00:00
Add 7.4 - enter chroot environment
This commit is contained in:
parent
bb6fa2ee69
commit
1b4481df6f
2 changed files with 22 additions and 0 deletions
10
scripts/chapter7/7.4-enter-chroot.sh
Normal file
10
scripts/chapter7/7.4-enter-chroot.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
chroot "$LFS" /usr/bin/env -i \
|
||||
HOME=/root \
|
||||
TERM="$TERM" \
|
||||
PS1='(lfs chroot) \u:\w\$ ' \
|
||||
PATH=/usr/bin:/usr/sbin \
|
||||
/bin/bash --login
|
||||
|
||||
|
|
@ -420,3 +420,15 @@ then
|
|||
stop_script "chapter7/7.3-prepare-virtual-fs.sh"
|
||||
fi
|
||||
|
||||
# Chapter 7.4
|
||||
# ===========
|
||||
echo "Entering the Chroot Environment"
|
||||
su -c "bash $PWD/chapter7/7.4-enter-chroot.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter7/7.4-enter-chroot.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue