From 64cc34541d75fb5bd0f4b0d4583c5d4a009cc1f0 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Tue, 28 Mar 2006 20:25:02 +0000 Subject: [PATCH] Removed a duplicate function. --- CLFS/master.sh | 16 ++++++++-------- common/common-functions | 15 --------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/CLFS/master.sh b/CLFS/master.sh index 9b90f55..119e19e 100755 --- a/CLFS/master.sh +++ b/CLFS/master.sh @@ -133,7 +133,7 @@ cross_tools_Makefiles() { # # [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" && echo -e '\ttrue' >> $MKFILE.tmp # - wrt_run_as_lfs "${this_script}" "${file}" + wrt_run_as_su "${this_script}" "${file}" # [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}" # @@ -185,7 +185,7 @@ temptools_Makefiles() { # # [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" && echo -e '\ttrue' >> $MKFILE.tmp # - wrt_run_as_lfs "${this_script}" "${file}" + wrt_run_as_su "${this_script}" "${file}" # [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}" # @@ -263,10 +263,10 @@ boot_Makefiles() { # *fstab*) if [[ -n "$FSTAB" ]]; then wrt_copy_fstab "${this_script}" else - wrt_run_as_lfs "${this_script}" "${file}" + wrt_run_as_su "${this_script}" "${file}" fi ;; - *) wrt_run_as_lfs "${this_script}" "${file}" ;; + *) wrt_run_as_su "${this_script}" "${file}" ;; esac # # Housekeeping...remove any build directory(ies) except if the package build fails. @@ -333,7 +333,7 @@ chroot_Makefiles() { # # Select a script execution method case $this_script in *kernfs) wrt_run_as_root "${this_script}" "${file}" ;; - *util-linux) wrt_run_as_lfs "${this_script}" "${file}" ;; + *util-linux) wrt_run_as_su "${this_script}" "${file}" ;; *) wrt_run_as_chroot1 "${this_script}" "${file}" ;; esac # @@ -537,7 +537,7 @@ bm_final_system_Makefiles() { # this_script=`basename $file` # Test if the stripping phase must be skipped - case $this_script in + case $this_script in *stripping*) [[ "$STRIP" = "0" ]] && continue ;; esac @@ -1006,7 +1006,7 @@ fi if [[ "${METHOD}" = "boot" ]]; then ( cat << EOF - + all: 023-creatingtoolsdir 024-creatingcrossdir 025-addinguser 026-settingenvironment \ $cross_tools \ $temptools \ @@ -1044,7 +1044,7 @@ clean-jhalfs: clean-makeboot: rm -rf /tools/* - rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools + rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools rm -f restore-lfs-env sources-dir cd logs && rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools && cd .. diff --git a/common/common-functions b/common/common-functions index a41ba98..b8ffb71 100644 --- a/common/common-functions +++ b/common/common-functions @@ -279,21 +279,6 @@ EOF } -#==================================# -wrt_run_as_lfs() { # -#==================================# - local this_script=$1 - local file=$2 -( -cat << EOF - @echo -e "\n\`date\`\n\nKB: \`du -sk --exclude={0,1}??-* \$(MOUNT_PT)\`\n" >logs/$this_script && \\ - su - lfs -c "source /home/lfs/.bashrc && $JHALFSDIR/${PROGNAME}-commands/$file" >>logs/$this_script 2>&1 && \\ - echo -e "\n\`date\`\n\nKB: \`du -sk --exclude={0,1}??-* \$(MOUNT_PT)\`\n" >>logs/$this_script -EOF -) >> $MKFILE.tmp -} - - #----------------------------------# wrt_run_as_root() { # #----------------------------------#