X-Git-Url: https://www.hackdaworld.org/gitweb/?p=hdw-linux%2Fhdw-linux.git;a=blobdiff_plain;f=scripts%2FBuild-Distro;fp=scripts%2FBuild-Distro;h=0f0f62f72d3c124b949890db1e65ac591602d9f0;hp=70d501e155e00d0385b44041dfd7f7584d7d5db5;hb=504579d0d381b02fc33fe1c696d64f96135a15a8;hpb=c7b7c7d4ce2f5a6947e42ff37d9584d26eb52ba4 diff --git a/scripts/Build-Distro b/scripts/Build-Distro index 70d501e..0f0f62f 100755 --- a/scripts/Build-Distro +++ b/scripts/Build-Distro @@ -80,14 +80,14 @@ for stage in $stages; do [ ! -d ${hdw_build_dir}/var/adm/deps ] && \ mkdir -p ${hdw_build_dir}/var/adm/deps/{run,build} # symlinking the stage 0/1 prefix to hostsystem root - if [ -d /$s1_prefix ]; then - if [ ! -L /$s1_prefix ]; then + if [ -d /$tc_name ]; then + if [ ! -L /$tc_name ]; then echo_r "WARNING: " - echo_w "move /$s1_prefix to /${s1_prefix}_old" - mv /$s1_prefix /${s1_prefix}_old + echo_w "move /$tc_name to /${tc_name}_old" + mv /$tc_name /${tc_name}_old fi fi - ln -sf $hdw_build_dir/$s1_prefix / + ln -sf $hdw_build_dir/$tc_name / fi # build according buildorder @@ -199,7 +199,7 @@ for stage in $stages; do echo_c "preparing chroot commands ..." cat > $root/chroot.sh <<- EOT # PATH -export PATH="\$PATH:/${s1_prefix}/bin:/${s1_prefix}/sbin" +export PATH="\$PATH:/${tc_name}/bin:/${tc_name}/sbin" # create essential device nodes mknod -m 600 /dev/console c 5 1 mknod -m 666 /dev/null c 1 3 @@ -240,9 +240,9 @@ EOT mount -t devpts devpts $root/dev/pts echo_w "entering chroot and start building now ..." echo - chroot $hdw_build_dir /${s1_prefix}/bin/env PS1='\u@\w\$ ' \ + chroot $hdw_build_dir /${tc_name}/bin/env PS1='\u@\w\$ ' \ PATH="/bin:/usr/bin:/sbin:/usr/sbin" HOME=/root \ - /${s1_prefix}/bin/bash --login +h /chroot.sh + /${tc_name}/bin/bash --login +h /chroot.sh if [ ! "$?" = "0" ]; then echo_r "something failed in the chroot, aborting." exit 1