Removed a duplicate function.

This commit is contained in:
Manuel Canales Esparcia 2006-03-28 20:25:02 +00:00
parent 60b56fd4e0
commit 64cc34541d
2 changed files with 8 additions and 23 deletions

View file

@ -133,7 +133,7 @@ cross_tools_Makefiles() { #
# #
[[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" && echo -e '\ttrue' >> $MKFILE.tmp [[ "$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}" [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
# #
@ -185,7 +185,7 @@ temptools_Makefiles() { #
# #
[[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" && echo -e '\ttrue' >> $MKFILE.tmp [[ "$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}" [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
# #
@ -263,10 +263,10 @@ boot_Makefiles() { #
*fstab*) if [[ -n "$FSTAB" ]]; then *fstab*) if [[ -n "$FSTAB" ]]; then
wrt_copy_fstab "${this_script}" wrt_copy_fstab "${this_script}"
else else
wrt_run_as_lfs "${this_script}" "${file}" wrt_run_as_su "${this_script}" "${file}"
fi fi
;; ;;
*) wrt_run_as_lfs "${this_script}" "${file}" ;; *) wrt_run_as_su "${this_script}" "${file}" ;;
esac esac
# #
# Housekeeping...remove any build directory(ies) except if the package build fails. # Housekeeping...remove any build directory(ies) except if the package build fails.
@ -333,7 +333,7 @@ chroot_Makefiles() { #
# Select a script execution method # Select a script execution method
case $this_script in case $this_script in
*kernfs) wrt_run_as_root "${this_script}" "${file}" ;; *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}" ;; *) wrt_run_as_chroot1 "${this_script}" "${file}" ;;
esac esac
# #

View file

@ -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() { # wrt_run_as_root() { #
#----------------------------------# #----------------------------------#