Actually I think it probably needs to be

`BS_PACKAGESITE=${PACKAGESITE:-"http://pkgbeta.freebsd.org/freebsd:9:${BSD_ARCH}/latest"}`

so the `:-` format won't set $PACKAGESITE but if its unset $BS_PACKAGESITE will get the value or that of $PACKAGESITE if its defined. I'd probably try to keep $PACKAGESITE as the environment variable as thats in keeping with the environment variables you can use to override `pkg`.