Changeset 179ae85


Ignore:
Timestamp:
05/12/2014 06:51:20 AM (10 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, new_features, trunk
Children:
ba57e61
Parents:
ff9938f
Message:

Adapt instructions to new layout for "boot" method, while keeping
compatibility with older layouts. Joint work with W. Harrington

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLFS/master.sh

    rff9938f r179ae85  
    338338    case $this_script in
    339339      *grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;;
     340      *how-to-view*) continue  ;;
    340341      *whatnext*) continue     ;;
    341342      *fstab)   [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
     
    348349    #
    349350    # First append each name of the script files to a list (this will become
    350     # the names of the targets in the Makefile
    351     case "${this_script}" in
    352       *changingowner)  orphan_scripts="${orphan_scripts} ${this_script}"  ;;
    353       *devices)        orphan_scripts="${orphan_scripts} ${this_script}"  ;;
    354       *)               boottools="$boottools $this_script" ;;
    355     esac
     351    # the names of the targets in the Makefile). Those names differ depending
     352    # on the version of the book. What makes the difference between those
     353    # versions is the presence of "how-to-view" in the boot chapter.
     354    if [ -f boot/*how-to-view ]; then
     355      case "${this_script}" in
     356        *changingowner)
     357           orphan_scripts="${orphan_scripts} ${this_script}"
     358           ;;
     359        *creatingdirs)
     360           orphan_scripts="${orphan_scripts} ${this_script}"
     361           ;;
     362        *createfiles)
     363           orphan_scripts="${orphan_scripts} ${this_script}"
     364           ;;
     365        *devices)
     366           orphan_scripts="${orphan_scripts} ${this_script}"
     367           ;;
     368        *flags)
     369           orphan_scripts="${orphan_scripts} ${this_script}"
     370           ;;
     371        *fstab)
     372           orphan_scripts="${orphan_scripts} ${this_script}"
     373           ;;
     374        *pwdgroup)
     375           orphan_scripts="${orphan_scripts} ${this_script}"
     376           ;;
     377        *settingenvironment)
     378           orphan_scripts="${orphan_scripts} ${this_script}"
     379           ;;
     380        *)
     381           boottools="$boottools $this_script"
     382           ;;
     383      esac
     384    else
     385      case "${this_script}" in
     386        *changingowner)
     387           orphan_scripts="${orphan_scripts} ${this_script}"
     388           ;;
     389        *devices)
     390           orphan_scripts="${orphan_scripts} ${this_script}"
     391           ;;
     392        *)
     393           boottools="$boottools $this_script"
     394           ;;
     395      esac
     396    fi
    356397    #
    357398    # Grab the name of the target, strip id number and misc words.
    358399    case $this_script in
    359       *kernel)        name=linux                   ;;
    360       *bootscripts)   name="bootscripts-cross-lfs" ;;
    361       *boot-scripts)   name="boot-scripts-cross-lfs" ;;
    362       *udev-rules)    name="udev-cross-lfs"        ;;
    363       *grub-build)    name=grub                    ;;
    364       *-aboot-build)  name=aboot                   ;;
    365       *yaboot-build)  name=yaboot                  ;;
    366       *colo-build)    name=colo                    ;;
    367       *silo-build)    name=silo                    ;;
    368       *arcload-build) name=arcload                 ;;
    369       *lilo-build)    name=lilo                    ;;
     400      *kernel)        name=linux                    ;;
     401      *bootscripts)   name="bootscripts-cross-lfs"  ;;
     402      *boot-scripts)  name="boot-scripts-cross-lfs" ;;
     403      *udev-rules)    name="udev-cross-lfs"         ;;
     404      *grub-build)    name=grub                     ;;
     405      *-aboot-build)  name=aboot                    ;;
     406      *yaboot-build)  name=yaboot                   ;;
     407      *colo-build)    name=colo                     ;;
     408      *silo-build)    name=silo                     ;;
     409      *arcload-build) name=arcload                  ;;
     410      *lilo-build)    name=lilo                     ;;
    370411      *)              name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;;
    371412    esac
     
    388429    #
    389430    # Select a script execution method
    390     case $this_script in
    391        # The following 2 scripts are defined in the /boot directory but need
    392        # to be run as a root user. Set them up here but run them in another phase
    393       *changingowner*)  wrt_RunAsRoot "${file}"    ;;
    394       *devices*)        wrt_RunAsRoot "${file}"    ;;
    395       *fstab*)   if [[ -n "$FSTAB" ]]; then
    396                    LUSER_wrt_CopyFstab
    397                  else
    398                    LUSER_wrt_RunAsUser  "${file}"
    399                  fi
    400          ;;
    401       *)         LUSER_wrt_RunAsUser  "${file}"       ;;
    402     esac
     431    if [ -f boot/*how-to-view ]; then
     432      case $this_script in
     433        # The following 8 scripts are defined in the /boot directory but need
     434        # to be run as a root user. Set them up here but run them in another
     435        # phase
     436        *changingowner)      wrt_RunAsRoot "${file}"    ;;
     437        *creatingdirs)       wrt_RunAsRoot "${file}"    ;;
     438        *createfiles)        wrt_RunAsRoot "${file}"    ;;
     439        *devices)            wrt_RunAsRoot "${file}"    ;;
     440        *flags)              wrt_RunAsRoot "${file}"    ;;
     441        *fstab)
     442           if [[ -n "$FSTAB" ]]; then
     443               LUSER_wrt_CopyFstab
     444           else
     445               wrt_RunAsRoot  "${file}"
     446           fi
     447           ;;
     448        *pwdgroup)           wrt_RunAsRoot "${file}"    ;;
     449        *settingenvironment) wrt_RunAsRoot "${file}"    ;;
     450        *)               LUSER_wrt_RunAsUser  "${file}" ;;
     451      esac
     452    else
     453      case $this_script in
     454        # The following 2 scripts are defined in the /boot directory but need
     455        # to be run as a root user. Set them up here but run them in another
     456        # phase
     457        *changingowner)   wrt_RunAsRoot "${file}"    ;;
     458        *devices)         wrt_RunAsRoot "${file}"    ;;
     459        *fstab)
     460           if [[ -n "$FSTAB" ]]; then
     461               LUSER_wrt_CopyFstab
     462           else
     463               LUSER_wrt_RunAsUser  "${file}"
     464           fi
     465           ;;
     466        *)            LUSER_wrt_RunAsUser  "${file}" ;;
     467      esac
     468    fi
    403469    #
    404470    # Housekeeping...remove any build directory(ies) except if the package build fails.
Note: See TracChangeset for help on using the changeset viewer.