From c47ef15f23390ca87edb64877a5431729f66cf10 Mon Sep 17 00:00:00 2001 From: Michael Reifenberger Date: Fri, 30 Jan 2015 15:42:52 +0000 Subject: [PATCH] Keep original images, dont compile tests, makefs for iso images translates labes to uppercase, so adopt fstab for this case. --- tools/tools/nanobsd/rescue/build.sh | 11 +++++++---- tools/tools/nanobsd/rescue/common | 20 ++++++++++++++++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/tools/tools/nanobsd/rescue/build.sh b/tools/tools/nanobsd/rescue/build.sh index 4c109ff96cbb..7d2ed80cd265 100755 --- a/tools/tools/nanobsd/rescue/build.sh +++ b/tools/tools/nanobsd/rescue/build.sh @@ -23,20 +23,23 @@ fi sh ../nanobsd.sh $* -c ${CFG} +if [ \! -d /usr/obj/Rescue ]; then + mkdir -p /usr/obj/Rescue +fi F32="/usr/obj/Rescue/rescue_${today}_x32" D32="/usr/obj/nanobsd.rescue_i386" if [ -f "${D32}/_.disk.full" ]; then - mv "${D32}/_.disk.full" "${F32}.img" + cp "${D32}/_.disk.full" "${F32}.img" fi if [ -f "${D32}/_.disk.iso" ]; then - mv "${D32}/_.disk.iso" "${F32}.iso" + cp "${D32}/_.disk.iso" "${F32}.iso" fi F64="/usr/obj/Rescue/rescue_${today}_x64" D64="/usr/obj/nanobsd.rescue_amd64" if [ -f "${D64}/_.disk.full" ]; then - mv "${D64}/_.disk.full" "${F64}.img" + cp "${D64}/_.disk.full" "${F64}.img" fi if [ -f "${D64}/_.disk.iso" ]; then - mv "${D64}/_.disk.iso" "${F64}.iso" + cp "${D64}/_.disk.iso" "${F64}.iso" fi diff --git a/tools/tools/nanobsd/rescue/common b/tools/tools/nanobsd/rescue/common index 3fd06c892495..908455e5362d 100644 --- a/tools/tools/nanobsd/rescue/common +++ b/tools/tools/nanobsd/rescue/common @@ -31,9 +31,19 @@ CONF_INSTALL=' CONF_WORLD=' #TARGET_ARCH=i386 CFLAGS=-O -pipe +WITHOUT_TESTS=YES ALL_MODULES=YES ' +# Functions +toLower() { + echo $1 | tr "[:upper:]" "[:lower:]" +} + +toUpper() { + echo $1 | tr "[:lower:]" "[:upper:]" +} + #customize_cmd cust_comconsole customize_cmd cust_allow_ssh_root customize_cmd cust_install_files @@ -93,16 +103,22 @@ last_orders () ( pprint 2 "last orders" ( cd ${NANO_WORLDDIR} - echo "/dev/iso9660/${NANO_LABEL} / cd9660 ro,noatime 0 0" > etc/fstab + #makefs converts labels to uppercase anyways + BIGLABEL=`toUpper "${NANO_LABEL}"` + echo "/dev/iso9660/${BIGLABEL} / cd9660 ro,noatime 0 0" > etc/fstab echo "tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0" >> etc/fstab echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab # echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab rm -f conf/default/etc/remount touch conf/default/etc/.keepme touch conf/default/var/.keepme + mkdir bootpool + mkdir mnt/a + mkdir mnt/b + mkdir mnt/c cd .. makefs -t cd9660 -o rockridge \ - -o label="${NANO_LABEL}" -o publisher="RMX" \ + -o label="${BIGLABEL}" -o publisher="RMX" \ -o bootimage="i386;_.w/boot/cdboot" -o no-emul-boot _.disk.iso _.w/ ) )