Using the full path for chroot commands.
This commit is contained in:
parent
b33a57b985
commit
8381f6e7c3
3 changed files with 40 additions and 21 deletions
|
@ -1022,15 +1022,20 @@ EOF
|
|||
|
||||
# Add chroot commands
|
||||
if [ "$METHOD" = "chroot" ] ; then
|
||||
chroot=`cat chroot/*chroot* | sed -e '/#!\/tools\/bin\/bash/d' \
|
||||
-e '/^export/d' \
|
||||
-e '/^logout/d' \
|
||||
-e 's@ \\\@ @g' | tr -d '\n' | sed -e 's/ */ /g' \
|
||||
-e 's|\\$|&&|g' \
|
||||
-e 's|exit||g' \
|
||||
-e 's|$| -c|' \
|
||||
-e 's|"$$CLFS"|$(MOUNT_PT)|'\
|
||||
-e 's|set -e||'`
|
||||
CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"
|
||||
chroot=`cat chroot/*chroot* | \
|
||||
sed -e "s@chroot@$CHROOT_LOC@" \
|
||||
-e '/#!\/tools\/bin\/bash/d' \
|
||||
-e '/^export/d' \
|
||||
-e '/^logout/d' \
|
||||
-e 's@ \\\@ @g' | \
|
||||
tr -d '\n' | \
|
||||
sed -e 's/ */ /g' \
|
||||
-e 's|\\$|&&|g' \
|
||||
-e 's|exit||g' \
|
||||
-e 's|$| -c|' \
|
||||
-e 's|"$$CLFS"|$(MOUNT_PT)|'\
|
||||
-e 's|set -e||'`
|
||||
echo -e "CHROOT1= $chroot\n" >> $MKFILE
|
||||
fi
|
||||
|
||||
|
|
|
@ -495,17 +495,22 @@ EOF
|
|||
|
||||
|
||||
# Add chroot commands
|
||||
CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"
|
||||
i=1
|
||||
for file in chapter06/*chroot* ; do
|
||||
chroot=`cat $file | sed -e '/#!\/bin\/sh/d' \
|
||||
-e '/^export/d' \
|
||||
-e '/^logout/d' \
|
||||
-e 's@ \\\@ @g' | tr -d '\n' | sed -e 's/ */ /g' \
|
||||
-e 's|\\$|&&|g' \
|
||||
-e 's|exit||g' \
|
||||
-e 's|$| -c|' \
|
||||
-e 's|"$$HLFS"|$(MOUNT_PT)|'\
|
||||
-e 's|set -e||'`
|
||||
chroot=`cat $file | \
|
||||
sed -e "s@chroot@$CHROOT_LOC@" \
|
||||
-e '/#!\/bin\/sh/d' \
|
||||
-e '/^export/d' \
|
||||
-e '/^logout/d' \
|
||||
-e 's@ \\\@ @g' | \
|
||||
tr -d '\n' | \
|
||||
sed -e 's/ */ /g' \
|
||||
-e 's|\\$|&&|g' \
|
||||
-e 's|exit||g' \
|
||||
-e 's|$| -c|' \
|
||||
-e 's|"$$HLFS"|$(MOUNT_PT)|'\
|
||||
-e 's|set -e||'`
|
||||
echo -e "CHROOT$i= $chroot\n" >> $MKFILE
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
|
|
@ -378,11 +378,20 @@ EOF
|
|||
|
||||
|
||||
# Add chroot commands
|
||||
CHROOT_LOC="`whereis -b chroot | cut -d " " -f2`"
|
||||
i=1
|
||||
for file in chapter06/*chroot* ; do
|
||||
chroot=`cat $file | sed -e '/#!\/bin\/sh/d' -e 's@ \\\@ @g' | tr -d '\n' | sed \
|
||||
-e 's/ */ /g' -e 's|\\$|&&|g' -e 's|exit||g' -e 's|$| -c|' \
|
||||
-e 's|"$$LFS"|$(MOUNT_PT)|' -e 's|set -e||'`
|
||||
chroot=`cat $file | \
|
||||
sed -e "s@chroot@$CHROOT_LOC@" \
|
||||
-e '/#!\/bin\/sh/d' \
|
||||
-e 's@ \\\@ @g' | \
|
||||
tr -d '\n' | \
|
||||
sed -e 's/ */ /g' \
|
||||
-e 's|\\$|&&|g' \
|
||||
-e 's|exit||g' \
|
||||
-e 's|$| -c|' \
|
||||
-e 's|"$$LFS"|$(MOUNT_PT)|' \
|
||||
-e 's|set -e||'`
|
||||
echo -e "CHROOT$i= $chroot\n" >> $MKFILE
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
|
Reference in a new issue