From 6eef5ef3fe0f41283c97c7f1f5b42aa93c15776f Mon Sep 17 00:00:00 2001 From: George Boudreau Date: Tue, 21 Mar 2006 23:25:40 +0000 Subject: [PATCH] CLFS, manipulation of BOOT_CONFIG in CLFS/master.sh and common/func_validate_configs.sh --- CLFS/master.sh | 4 ++-- common/func_validate_configs.sh | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CLFS/master.sh b/CLFS/master.sh index a0be31a..761d2b1 100755 --- a/CLFS/master.sh +++ b/CLFS/master.sh @@ -219,8 +219,8 @@ boot_Makefiles() { # *kernel) # if there is no kernel config file do not build the kernel [[ -z $CONFIG ]] && continue # Copy the config file to /sources with a standardized name - cp $CONFIG $BUILDDIR/sources/kernel-config - sed "s|make mrproper|make mrproper\ncp /sources/kernel-config .config|" -i $file + cp $BOOT_CONFIG $BUILDDIR/sources/bootkernel-config + sed "s|make mrproper|make mrproper\ncp /sources/bootkernel-config .config|" -i $file # You cannot run menuconfig from within the makefile sed 's|menuconfig|oldconfig|' -i $file #If defined include the keymap in the kernel diff --git a/common/func_validate_configs.sh b/common/func_validate_configs.sh index bb1b859..87ec60a 100644 --- a/common/func_validate_configs.sh +++ b/common/func_validate_configs.sh @@ -116,7 +116,7 @@ inline_doc fi - for config_param in FSTAB CONFIG BOOK; do + for config_param in FSTAB BOOK CONFIG; do [[ $1 = "1" ]] && echo "`eval echo $PARAM_VALS`" if [[ $config_param = BOOK ]]; then [[ ! "${WC}" = 1 ]] && continue @@ -127,8 +127,20 @@ inline_doc # If you make it this far then there is a problem write_error_and_die done - echo " ${BOLD}${GREEN}${PARAM_GROUP%%_*T} specific parameters are valid${OFF}" + + [[ "$PROGNAME" = "clfs" ]] && + for config_param in BOOT_CONFIG; do + if [[ "${METHOD}" = "boot" ]]; then + [[ $1 = "1" ]] && echo "`eval echo $PARAM_VALS`" + # There must be a config file when the build method is 'boot' + [[ -e "${!config_param}" ]] && [[ -s "${!config_param}" ]] && continue + # If you make it this far then there is a problem + write_error_and_die + fi + done + echo " ${BOLD}${GREEN}${PARAM_GROUP%%_*T} specific parameters are valid${OFF}" done + set -e echo "$tab_***${BOLD}${GREEN}Config parameters look good${OFF}***" }