Added a switch to submmint a real /etc/fstab file.

Some space clean-up.
This commit is contained in:
Manuel Canales Esparcia 2005-10-14 21:57:22 +00:00
parent 1f1d6a145e
commit 50408d5a72

28
jhalfs
View file

@ -46,6 +46,11 @@ Options:
build Groff. If not specified, \"letter\" build Groff. If not specified, \"letter\"
will be used. will be used.
--fstab FILE use FILE as the /etc/fstab file for the
LFS system. If not specified, a default
/etc/fstab file with dummy values is
created.
-C, --kernel-config FILE use the kernel configuration file specified -C, --kernel-config FILE use the kernel configuration file specified
in FILE to build the kernel. If not found, in FILE to build the kernel. If not found,
the kernel build is skipped. the kernel build is skipped.
@ -169,6 +174,18 @@ while test $# -gt 0 ; do
shift shift
;; ;;
--fstab )
test $# = 1 && eval "$exit_missing_arg"
shift
if [ -f $1 ] ; then
FSTAB=$1
else
echo -e "\nFile $1 not found. Verify your command line.\n"
exit 1
fi
shift
;;
--kernel-config | -C ) --kernel-config | -C )
test $# = 1 && eval "$exit_missing_arg" test $# = 1 && eval "$exit_missing_arg"
shift shift
@ -745,6 +762,16 @@ EOF
) >> $MKFILE.tmp ) >> $MKFILE.tmp
fi fi
# Check if we have a real /etc/fstab file
if [ ${i:4:5} = "fstab" ] && [ -n "$FSTAB" ] ; then
(
cat << EOF
@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\n" >logs/$i && \\
cp -v $FSTAB \$(LFS)/etc/fstab >>logs/$i 2>&1 && \\
echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\n" >>logs/$i
EOF
) >> $MKFILE.tmp
else
# Initialize the log an run the script # Initialize the log an run the script
( (
cat << EOF cat << EOF
@ -753,6 +780,7 @@ EOF
echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\n" >>logs/$i echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=0??-* \$(LFS)\`\n" >>logs/$i
EOF EOF
) >> $MKFILE.tmp ) >> $MKFILE.tmp
fi
# Remove the build directory except if the package build fails. # Remove the build directory except if the package build fails.
if [ ${i:4:11} = "bootscripts" -o ${i:4:6} = "kernel" ] ; then if [ ${i:4:11} = "bootscripts" -o ${i:4:6} = "kernel" ] ; then