aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--insidechroot.sh3
-rwxr-xr-xlfs.sh2
2 files changed, 3 insertions, 2 deletions
diff --git a/insidechroot.sh b/insidechroot.sh
index 88a5d26..57951ab 100644
--- a/insidechroot.sh
+++ b/insidechroot.sh
@@ -131,7 +131,7 @@ nogroup:x:99:
users:x:999:
EOF
- echo "tester:x:$(ls -n "$(tty)" | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd
+ echo "tester:x:${TESTERUID}:101::/home/tester:/bin/bash" >> /etc/passwd
echo "tester:x:101:" >> /etc/group
install -o tester -d /home/tester
@@ -162,4 +162,3 @@ EOF
else
printf "%b" "Do Chapter 8, 9 and 10 stuff here.\n"
fi
-
diff --git a/lfs.sh b/lfs.sh
index d1b23a5..fedf71a 100755
--- a/lfs.sh
+++ b/lfs.sh
@@ -116,6 +116,7 @@ sudo chroot "${LFS}" /usr/bin/env \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
NUMPROCS="${NUMPROCS}" \
MAKEFLAGS="${MAKEFLAGS}" \
+ TESTERUID="$(id -u)" \
/bin/bash --login +h -c "/sources/insidechroot.sh 7"
retval=$?
@@ -147,6 +148,7 @@ sudo chroot "${LFS}" /usr/bin/env \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
NUMPROCS="${NUMPROCS}" \
MAKEFLAGS="${MAKEFLAGS}" \
+ TESTERUID="$(id -u)" \
/bin/bash --login +h -c "/sources/insidechroot.sh 8"
printf "%b" "${CYN}EXITED ${RED}CHROOT${RST} ENVIRONMENT...${RST}\n"