diff --git a/CLFS/clfs.xsl b/CLFS/clfs.xsl index 69c853f..63bb40a 100644 --- a/CLFS/clfs.xsl +++ b/CLFS/clfs.xsl @@ -86,7 +86,16 @@ - #!/bin/bash set +h + + + #!/tools/bin/bash set +h + + + #!/bin/bash set +h + + set -e diff --git a/CLFS/master.sh b/CLFS/master.sh index 658e426..9eb72cc 100644 --- a/CLFS/master.sh +++ b/CLFS/master.sh @@ -795,22 +795,9 @@ mk_CROSS: mk_SETUP mk_SUDO: mk_CROSS @sudo make SUDO @touch \$@ -# -# The convoluted piece of code below is necessary to provide 'make' with a valid shell in the -# chroot environment. (Unless someone knows a different way) -# Manually create the /bin directory and provide link to the /tools dir. -# Also change the original symlink creation to include (f)orce to prevent failure due to -# pre-existing links. #---------------CHROOT JAIL mk_SYSTOOLS: mk_SUDO - @if [ ! -e \$(MOUNT_PT)/bin ]; then \\ - mkdir \$(MOUNT_PT)/bin; \\ - cd \$(MOUNT_PT)/bin && \\ - ln -svf /tools/bin/bash bash; ln -sf bash sh; \\ - sudo chown -R 0:0 \$(MOUNT_PT)/bin; \\ - fi; - @sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chroot/*-createfiles @\$(call echo_CHROOT_request) @\$(call echo_PHASE, CHROOT JAIL ) @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT_JAIL") diff --git a/HLFS/hlfs.xsl b/HLFS/hlfs.xsl index 4d1c7ab..64d20fe 100644 --- a/HLFS/hlfs.xsl +++ b/HLFS/hlfs.xsl @@ -83,7 +83,15 @@ - #!/bin/bash set +h + + + #!/tools/bin/bash set +h + + + #!/bin/bash set +h + + set -e diff --git a/HLFS/master.sh b/HLFS/master.sh index 8cec067..1bada8c 100644 --- a/HLFS/master.sh +++ b/HLFS/master.sh @@ -560,19 +560,12 @@ mk_SUDO: mk_LUSER @touch \$@ mk_CHROOT: mk_SUDO - @if [ ! -e \$(MOUNT_PT)/bin ]; then \\ - mkdir \$(MOUNT_PT)/bin && \\ - cd \$(MOUNT_PT)/bin && \\ - ln -sf /tools/bin/bash bash; ln -sf bash sh && \\ - sudo chown -R 0:0 \$(MOUNT_PT)/bin; \\ - fi; @if [ ! -e \$(MOUNT_PT)/dev ]; then \\ mkdir \$(MOUNT_PT)/dev && \\ sudo mknod -m 666 \$(MOUNT_PT)/dev/null c 1 3 && \\ sudo mknod -m 600 \$(MOUNT_PT)/dev/console c 5 1 && \\ sudo chown -R 0:0 \$(MOUNT_PT)/dev; fi; - @sudo sed -e 's|^ln -.. |ln -svf |' -i \$(CMDSDIR)/chapter06/*-createfiles @\$(call echo_CHROOT_request) @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT") @touch \$@ diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index 2906c35..0b03ef1 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -79,7 +79,15 @@ - #!/bin/bash set +h + + + #!/tools/bin/bash set +h + + + #!/bin/bash set +h + + set -e diff --git a/LFS/master.sh b/LFS/master.sh index b819c87..41f956c 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -435,22 +435,9 @@ mk_LUSER: mk_SETUP mk_SUDO: mk_LUSER @sudo make SUDO - touch \$@ -# -# The convoluted piece of code below is necessary to provide 'make' with a valid shell in the -# chroot environment. (Unless someone knows a different way) -# Manually create the /bin directory and provide link to the /tools dir. -# Also change the original symlink creation to include (f)orce to prevent failure due to -# pre-existing links. -# + @touch \$@ + mk_CHROOT: mk_SUDO - @if [ ! -e \$(MOUNT_PT)/bin ]; then \\ - mkdir \$(MOUNT_PT)/bin; \\ - cd \$(MOUNT_PT)/bin && \\ - ln -sf /tools/bin/bash bash; ln -sf bash sh; \\ - sudo chown -R 0:0 \$(MOUNT_PT)/bin; \\ - fi; - @sudo sed -e 's|^ln -sv |ln -svf |' -i \$(CMDSDIR)/chapter06/*-createfiles @\$(call echo_CHROOT_request) @( sudo \$(CHROOT1) "cd \$(SCRIPT_ROOT) && make CHROOT") @touch \$@ diff --git a/common/libs/func_wrt_Makefile b/common/libs/func_wrt_Makefile index 289155d..e5f2a0e 100644 --- a/common/libs/func_wrt_Makefile +++ b/common/libs/func_wrt_Makefile @@ -14,7 +14,11 @@ wrt_Makefile_header() { # # # Generated on `date "+%F %X %Z"` -SHELL = /bin/bash +ifeq (\$(shell [ -x /bin/bash ] && echo /bin/bash),/bin/bash) + SHELL = /bin/bash +else + SHELL = /tools/bin/bash +endif SRC = /sources MOUNT_PT = $BUILDDIR @@ -104,7 +108,7 @@ cat << EOF $i: $PREV @\$(call echo_message, Building) - @./progress_bar.sh \$@ \$\$PPID & + @\$(SHELL) progress_bar.sh \$@ \$\$PPID & @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@ @\$(PRT_DU) >>logs/\$@ EOF diff --git a/common/progress_bar.sh b/common/progress_bar.sh old mode 100755 new mode 100644 index 622dc15..769e6bd --- a/common/progress_bar.sh +++ b/common/progress_bar.sh @@ -1,4 +1,3 @@ -#!/bin/bash # $Id$