Changeset 8f2c086


Ignore:
Timestamp:
11/11/2006 09:20:15 PM (17 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
ca6b261
Parents:
195ed9f
Message:

Functions clean-up.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CLFS/master.sh

    r195ed9f r8f2c086  
    358358    #
    359359    if [ "$pkg_tarball" != "" ] ; then
    360       case $this_script in
    361         *util-linux)      ROOT_Unpack  "$pkg_tarball"  ;;
    362         *)              CHROOT_Unpack "$pkg_tarball"  ;;
    363       esac
     360      CHROOT_Unpack "$pkg_tarball"
    364361      [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
    365362    fi
     
    367364    # Select a script execution method
    368365    case $this_script in
    369       *kernfs)      wrt_RunAsRoot         "${this_script}" "${file}"  ;;
    370       *util-linux)  ROOT_RunAsRoot        "${file}"  ;;
     366      *kernfs)      wrt_RunAsRoot         "${file}"  ;;
    371367      *)            CHROOT_wrt_RunAsRoot  "${file}"  ;;
    372368    esac
     
    457453       # The following 2 scripts are defined in the /boot directory but need
    458454       # to be run as a root user. Set them up here but run them in another phase
    459       *changingowner*)  wrt_RunAsRoot "${this_script}" "${file}"    ;;
    460       *devices*)        wrt_RunAsRoot "${this_script}" "${file}"    ;;
     455      *changingowner*)  wrt_RunAsRoot "${file}"    ;;
     456      *devices*)        wrt_RunAsRoot "${file}"    ;;
    461457      *fstab*)   if [[ -n "$FSTAB" ]]; then
    462458                   LUSER_wrt_CopyFstab
  • CLFS2/master.sh

    r195ed9f r8f2c086  
    392392                fi
    393393          ;;
    394       *chowning)  wrt_RunAsRoot "${this_script}" "${file}"
     394      *chowning)  wrt_RunAsRoot "${file}"
    395395          ;;
    396396              *)  LUSER_wrt_RunAsUser "${file}"
  • CLFS3/master.sh

    r195ed9f r8f2c086  
    386386                fi
    387387          ;;
    388       *chowning)  wrt_RunAsRoot "${this_script}" "${file}"
     388      *chowning)  wrt_RunAsRoot "${file}"
    389389          ;;
    390390              *)  LUSER_wrt_RunAsUser "${file}"
  • HLFS/master.sh

    r195ed9f r8f2c086  
    363363    case "${this_script}" in
    364364      *kernfs* | *changingowner*)
    365         wrt_RunAsRoot "${this_script}" "${file}"
     365        wrt_RunAsRoot "${file}"
    366366        ;;
    367367      *)   # The rest of Chapter06
  • LFS/master.sh

    r195ed9f r8f2c086  
    137137    # The changingowner script must be run as root.
    138138    case "${this_script}" in
    139       *changingowner)  wrt_RunAsRoot "${this_script}" "$file" ;;
     139      *changingowner)  wrt_RunAsRoot "$file" ;;
    140140      *)               LUSER_wrt_RunAsUser "$file" ;;
    141141    esac
     
    253253    # and not to use chroot.
    254254    case "${this_script}" in
    255       *kernfs)  wrt_RunAsRoot    "${this_script}" "$file" ;;
     255      *kernfs)  wrt_RunAsRoot  "$file" ;;
    256256      *)        CHROOT_wrt_RunAsRoot "$file" ;;
    257257    esac
  • common/libs/func_wrt_Makefile

    r195ed9f r8f2c086  
    127127
    128128#----------------------------------#
    129 ROOT_Unpack() {                    #  An alias, for clairity
    130 #----------------------------------#
    131   local FILE=$1
    132   local optSAVE_PREVIOUS=$2
    133 
    134   if [[ "${optSAVE_PREVIOUS}" != "1" ]]; then
    135 (
    136 cat << EOF
    137         @\$(call remove_existing_dirs,$FILE)
    138 EOF
    139 ) >> $MKFILE.tmp
    140   fi
    141 
    142 (
    143 cat << EOF
    144         @\$(call unpack,$FILE)
    145         @\$(call get_pkg_root_LUSER)
    146 EOF
    147 ) >> $MKFILE.tmp
    148 }
    149 
    150 #----------------------------------#
    151129LUSER_wrt_unpack() {               # Unpack and set 'ROOT' var
    152130#----------------------------------#
     
    214192(
    215193cat  << EOF
    216         @echo "export TEST_LOG=/\$(SCRIPT_ROOT)/test-logs/$TESTLOGFILE" >> envars && \\
     194        @echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
    217195        echo "\$(nl_)\`date\`\$(nl_)" >test-logs/$TESTLOGFILE
    218196EOF
     
    229207#----------------------------------#
    230208  local MOUNT_ENV
    231   local this_script=$1
    232   local file=$2
     209  local file=$1
    233210
    234211  case ${PROGNAME} in
    235212    lfs   ) MOUNT_ENV="LFS" ;;
    236     blfs  ) MOUNT_ENV="BLFS" ;;
    237213    clfs  ) MOUNT_ENV="CLFS" ;;
    238214    clfs2 ) MOUNT_ENV="CLFS" ;;
     
    251227
    252228#----------------------------------#
    253 ROOT_RunAsRoot() {                 #
    254 #----------------------------------#
    255   local file=$1
    256 (
    257 cat << EOF
    258         @( time { source envars && \$(CMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
    259         \$(PRT_DU_CR) >>logs/\$@
    260 EOF
    261 ) >> $MKFILE.tmp
    262 }
    263 
    264 #----------------------------------#
    265229LUSER_wrt_RunAsUser() {            # Execute script inside time { }, footer to log file
    266230#----------------------------------#
     
    281245(
    282246cat << EOF
    283         @( time { source envars && \$(crCMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
     247        @( time { source envars && \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
    284248        \$(PRT_DU_CR) >>logs/\$@
    285249EOF
Note: See TracChangeset for help on using the changeset viewer.