Adapt instructions to new layout for "boot" method, while keeping
compatibility with older layouts. Joint work with W. Harrington
This commit is contained in:
parent
ff9938fe50
commit
179ae85718
1 changed files with 96 additions and 30 deletions
|
@ -337,6 +337,7 @@ boot_Makefiles() { #
|
|||
# A little housekeeping on the scripts
|
||||
case $this_script in
|
||||
*grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;;
|
||||
*how-to-view*) continue ;;
|
||||
*whatnext*) continue ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*kernel) # if there is no kernel config file do not build the kernel
|
||||
|
@ -347,12 +348,52 @@ boot_Makefiles() { #
|
|||
esac
|
||||
#
|
||||
# First append each name of the script files to a list (this will become
|
||||
# the names of the targets in the Makefile
|
||||
# the names of the targets in the Makefile). Those names differ depending
|
||||
# on the version of the book. What makes the difference between those
|
||||
# versions is the presence of "how-to-view" in the boot chapter.
|
||||
if [ -f boot/*how-to-view ]; then
|
||||
case "${this_script}" in
|
||||
*changingowner) orphan_scripts="${orphan_scripts} ${this_script}" ;;
|
||||
*devices) orphan_scripts="${orphan_scripts} ${this_script}" ;;
|
||||
*) boottools="$boottools $this_script" ;;
|
||||
*changingowner)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*creatingdirs)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*createfiles)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*devices)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*flags)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*fstab)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*pwdgroup)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*settingenvironment)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*)
|
||||
boottools="$boottools $this_script"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case "${this_script}" in
|
||||
*changingowner)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*devices)
|
||||
orphan_scripts="${orphan_scripts} ${this_script}"
|
||||
;;
|
||||
*)
|
||||
boottools="$boottools $this_script"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
#
|
||||
# Grab the name of the target, strip id number and misc words.
|
||||
case $this_script in
|
||||
|
@ -387,12 +428,36 @@ boot_Makefiles() { #
|
|||
[[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
#
|
||||
# Select a script execution method
|
||||
if [ -f boot/*how-to-view ]; then
|
||||
case $this_script in
|
||||
# The following 8 scripts are defined in the /boot directory but need
|
||||
# to be run as a root user. Set them up here but run them in another
|
||||
# phase
|
||||
*changingowner) wrt_RunAsRoot "${file}" ;;
|
||||
*creatingdirs) wrt_RunAsRoot "${file}" ;;
|
||||
*createfiles) wrt_RunAsRoot "${file}" ;;
|
||||
*devices) wrt_RunAsRoot "${file}" ;;
|
||||
*flags) wrt_RunAsRoot "${file}" ;;
|
||||
*fstab)
|
||||
if [[ -n "$FSTAB" ]]; then
|
||||
LUSER_wrt_CopyFstab
|
||||
else
|
||||
wrt_RunAsRoot "${file}"
|
||||
fi
|
||||
;;
|
||||
*pwdgroup) wrt_RunAsRoot "${file}" ;;
|
||||
*settingenvironment) wrt_RunAsRoot "${file}" ;;
|
||||
*) LUSER_wrt_RunAsUser "${file}" ;;
|
||||
esac
|
||||
else
|
||||
case $this_script in
|
||||
# The following 2 scripts are defined in the /boot directory but need
|
||||
# to be run as a root user. Set them up here but run them in another phase
|
||||
*changingowner*) wrt_RunAsRoot "${file}" ;;
|
||||
*devices*) wrt_RunAsRoot "${file}" ;;
|
||||
*fstab*) if [[ -n "$FSTAB" ]]; then
|
||||
# to be run as a root user. Set them up here but run them in another
|
||||
# phase
|
||||
*changingowner) wrt_RunAsRoot "${file}" ;;
|
||||
*devices) wrt_RunAsRoot "${file}" ;;
|
||||
*fstab)
|
||||
if [[ -n "$FSTAB" ]]; then
|
||||
LUSER_wrt_CopyFstab
|
||||
else
|
||||
LUSER_wrt_RunAsUser "${file}"
|
||||
|
@ -400,6 +465,7 @@ boot_Makefiles() { #
|
|||
;;
|
||||
*) LUSER_wrt_RunAsUser "${file}" ;;
|
||||
esac
|
||||
fi
|
||||
#
|
||||
# Housekeeping...remove any build directory(ies) except if the package build fails.
|
||||
[[ "$pkg_tarball" != "" ]] && LUSER_RemoveBuildDirs "${name}"
|
||||
|
|
Reference in a new issue