svn commit: r291913 - head/tools/tools/nanobsd
Olivier Cochard-Labbé
olivier at cochard.me
Sat Dec 12 07:56:22 UTC 2015
On Mon, Dec 7, 2015 at 5:02 AM, Warner Losh <imp at freebsd.org> wrote:
> Author: imp
> Date: Mon Dec 7 04:02:31 2015
> New Revision: 291913
> URL: https://svnweb.freebsd.org/changeset/base/291913
>
> Log:
> Generally use shorter, more idiomatic sh expressions in a bunch of
> places.
>
> Modified:
> head/tools/tools/nanobsd/defaults.sh (contents, props changed)
>
Hi,
I beleive there is a tipo here :
>
> Modified: head/tools/tools/nanobsd/defaults.sh
>
> ==============================================================================
> --- head/tools/tools/nanobsd/defaults.sh Mon Dec 7 04:02:19 2015
> (r291912)
> +++ head/tools/tools/nanobsd/defaults.sh Mon Dec 7 04:02:31 2015
> (r291913)
>
> #######################################################################
> @@ -949,21 +949,21 @@ export_var ( ) { # Don't wawnt a subshe
> # Call this function to set defaults _after_ parsing options.
> # dont want a subshell otherwise variable setting is thrown away.
> set_defaults_and_export ( ) {
> - test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME}
> - test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ}
> - test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ}
> + : ${NANO_OBJ:=/usr/obj/nanobsd.${NANO_NAME}}
> + : ${MAKEOBJDIRPREFIX:=${NANO_OBJ}}
> + : ${NANO_DISKIMGDIR=:${NANO_OBJ}}
> NANO_WORLDDIR=${NANO_OBJ}/_.w
> NANO_MAKE_CONF_BUILD=${MAKEOBJDIRPREFIX}/make.conf.build
> NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install
>
>
Notice the line:
: ${NANO_DISKIMGDIR=:${NANO_OBJ}}
I beleive the good one is:
: ${NANO_DISKIMGDIR=${NANO_OBJ}}
(without the ':' before ${NANO_OBJ}}
Because with the ':' variable NANO_DISKIMGDIR includes the ':' in front of
its values, and dd didn't like it:
+ IMG=:/usr/obj/BSDRPcur.amd64/BSDRP-1.9998-full-amd64-vga.img
+ MNT=/usr/obj/BSDRPcur.amd64/_.mnt
+ mkdir -p /usr/obj/BSDRPcur.amd64/_.mnt
+ [ file '=' swap ]
+ echo 'Creating md backing file...'
Creating md backing file...
+ rm -f :/usr/obj/BSDRPcur.amd64/BSDRP-1.9998-full-amd64-vga.img
+ echo 'NANO RM -f :/usr/obj/BSDRPcur.amd64/BSDRP-1.9998-full-amd64-vga.img'
NANO RM -f :/usr/obj/BSDRPcur.amd64/BSDRP-1.9998-full-amd64-vga.img
+ uname -r
+ command rm -x -f :/usr/obj/BSDRPcur.amd64/BSDRP-1.9998-full-amd64-vga.img
+ dd 'if=/dev/zero'
'of=:/usr/obj/BSDRPcur.amd64/BSDRP-1.9998-full-amd64-vga.img'
'seek=1000000' 'count=0'
dd: :/usr/obj/BSDRPcur.amd64/BSDRP-1.9998-full-amd64-vga.img: No such file
or directory
Regards,
Olivier
More information about the svn-src-head
mailing list