From df6c7936fa59f2f7ea47501b93844fcd32f99ca5 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 28 Jul 2017 02:00:03 +0000 Subject: [PATCH] Allow _.disk.image to be specified. Submitted by: ask at develooper dot com (reworked to new structure) PR: 199191 Sponsored by: Netflix MFC After: 3 days --- tools/tools/nanobsd/defaults.sh | 4 +++- tools/tools/nanobsd/legacy.sh | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 56224c60f1ef..a419f5af9d83 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -71,6 +71,7 @@ NANO_PMAKE="make -j 3" # The default name for any image we create. NANO_IMGNAME="_.disk.full" +NANO_IMG1NAME="_.disk.image" # Options to put in make.conf during buildworld only CONF_BUILD=' ' @@ -652,7 +653,7 @@ last_orders ( ) ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished # image to a more convenient place: - # cp ${NANO_DISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk + # cp ${NANO_DISKIMGDIR}/${NANO_IMG1NAME} /home/ftp/pub/nanobsd.disk true ) @@ -919,6 +920,7 @@ set_defaults_and_export ( ) { export_var NANO_HEADS export_var NANO_IMAGES export_var NANO_IMGNAME + export_var NANO_IMG1NAME export_var NANO_MAKE export_var NANO_MAKE_CONF_BUILD export_var NANO_MAKE_CONF_INSTALL diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index f0d79fab2fa9..ce8c50f931e7 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -191,8 +191,9 @@ create_diskimage ( ) ( fi if ${do_copyout_partition} ; then - echo "Writing out _.disk.image..." - dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} of=${NANO_DISKIMGDIR}/_.disk.image bs=64k + echo "Writing out ${NANO_IMG1NAME}..." + dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} \ + of=${NANO_DISKIMGDIR}/${NANO_IMG1NAME} bs=64k fi mdconfig -d -u $MD