Fix logic for copying fstab. That stupid bug wanted to copy fstab when

FSTAB was empty!
This commit is contained in:
Pierre Labastie 2017-03-10 20:23:57 +00:00
parent 3d24e5bfdf
commit d601cfcc47
2 changed files with 7 additions and 7 deletions

View file

@ -378,7 +378,7 @@ boot_Makefiles() { #
*grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;; *grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;;
*how-to-view*) continue ;; *how-to-view*) continue ;;
*whatnext*) continue ;; *whatnext*) continue ;;
*fstab) [[ ! -z ${FSTAB} ]] && *fstab) [[ -z "${FSTAB}" ]] ||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] || [[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
cp ${FSTAB} $BUILDDIR/sources/fstab ;; cp ${FSTAB} $BUILDDIR/sources/fstab ;;
*kernel) # if there is no kernel config file do not build the kernel *kernel) # if there is no kernel config file do not build the kernel
@ -499,7 +499,7 @@ boot_Makefiles() { #
*changingowner) wrt_RunAsRoot "${file}" ;; *changingowner) wrt_RunAsRoot "${file}" ;;
*devices) wrt_RunAsRoot "${file}" ;; *devices) wrt_RunAsRoot "${file}" ;;
*fstab) *fstab)
if [[ -n "$FSTAB" ]]; then if [[ -n "${FSTAB}" ]]; then
LUSER_wrt_CopyFstab LUSER_wrt_CopyFstab
else else
LUSER_wrt_RunAsUser "${file}" LUSER_wrt_RunAsUser "${file}"
@ -734,10 +734,10 @@ bootscripts_Makefiles() { #
this_script=`basename $file` this_script=`basename $file`
case $this_script in case $this_script in
*udev) continue ;; # This is not a script but a commentary, we want udev-rules *udev) continue ;; # This is not a script but a comment, we want udev-rules
*console*) continue ;; # Use the files that came with the bootscripts *console*) continue ;; # Use the files that came with the bootscripts
# fstab is now here (for 3.x.y) # fstab is now here (for 3.x.y)
*fstab) [[ ! -z ${FSTAB} ]] && *fstab) [[ -z "${FSTAB}" ]] ||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] || [[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
cp ${FSTAB} $BUILDDIR/sources/fstab ;; cp ${FSTAB} $BUILDDIR/sources/fstab ;;
*) ;; *) ;;
@ -912,7 +912,7 @@ bootable_Makefiles() { #
# A little housekeeping on the scripts # A little housekeeping on the scripts
case $this_script in case $this_script in
*grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;; *grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;;
*fstab) [[ ! -z ${FSTAB} ]] && *fstab) [[ -z "${FSTAB}" ]] ||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] || [[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
cp ${FSTAB} $BUILDDIR/sources/fstab ;; cp ${FSTAB} $BUILDDIR/sources/fstab ;;
*kernel) # if there is no kernel config file do not build the kernel *kernel) # if there is no kernel config file do not build the kernel

View file

@ -312,7 +312,7 @@ chapter78_Makefiles() {
# If no .config file is supplied, the kernel build is skipped # If no .config file is supplied, the kernel build is skipped
case ${this_script} in case ${this_script} in
*grub) continue ;; *grub) continue ;;
*fstab) [[ ! -z ${FSTAB} ]] && *fstab) [[ -z "${FSTAB}" ]] ||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] || [[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
cp ${FSTAB} $BUILDDIR/sources/fstab ;; cp ${FSTAB} $BUILDDIR/sources/fstab ;;
*kernel) [[ -z ${CONFIG} ]] && continue *kernel) [[ -z ${CONFIG} ]] && continue
@ -366,7 +366,7 @@ chapter78_Makefiles() {
# Check if we have a real /etc/fstab file # Check if we have a real /etc/fstab file
case "${this_script}" in case "${this_script}" in
*fstab) if [[ -n $FSTAB ]]; then *fstab) if [[ -n "$FSTAB" ]]; then
CHROOT_wrt_CopyFstab CHROOT_wrt_CopyFstab
else else
CHROOT_wrt_RunAsRoot "$file" CHROOT_wrt_RunAsRoot "$file"