r2895 - in jhalfs/branches/experimental: CLFS HLFS LFS

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Aug 6 02:53:12 PDT 2006


Author: manuel
Date: 2006-08-06 03:53:10 -0600 (Sun, 06 Aug 2006)
New Revision: 2895

Modified:
   jhalfs/branches/experimental/CLFS/master.sh
   jhalfs/branches/experimental/HLFS/master.sh
   jhalfs/branches/experimental/LFS/master.sh
Log:
Using the full path for chroot commands.

Modified: jhalfs/branches/experimental/CLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/CLFS/master.sh	2006-08-06 08:53:03 UTC (rev 2894)
+++ jhalfs/branches/experimental/CLFS/master.sh	2006-08-06 09:53:10 UTC (rev 2895)
@@ -1022,15 +1022,20 @@
 
   # 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 at 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
 

Modified: jhalfs/branches/experimental/HLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/HLFS/master.sh	2006-08-06 08:53:03 UTC (rev 2894)
+++ jhalfs/branches/experimental/HLFS/master.sh	2006-08-06 09:53:10 UTC (rev 2895)
@@ -495,17 +495,22 @@
 
 
   # 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 at 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

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-08-06 08:53:03 UTC (rev 2894)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-08-06 09:53:10 UTC (rev 2895)
@@ -378,11 +378,20 @@
 
 
   # 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 at 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




More information about the alfs-log mailing list