Before copying the mk.conf.example file into PKG_SYSCONFDIR, the

directory must be created... do it.

Also replace /usr/pkg with $prefix in a few places.
This commit is contained in:
xtraeme 2005-02-18 00:26:07 +00:00
parent 1faa8c5552
commit c2eeaef993

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# $NetBSD: mkbinarykit,v 1.11 2005/01/16 03:02:02 grant Exp $ # $NetBSD: mkbinarykit,v 1.12 2005/02/18 00:26:07 xtraeme Exp $
# #
# Make a binary bootstrap kit and place it in targetdir (or current # Make a binary bootstrap kit and place it in targetdir (or current
# working directory if not specified). The mk.conf.example file is # working directory if not specified). The mk.conf.example file is
@ -19,8 +19,9 @@ ospro=`uname -p`
date=`date +%Y%m%d` date=`date +%Y%m%d`
prefix=/usr/pkg prefix=/usr/pkg
sysconfdir=/etc
pkgdbdir=/var/db/pkg pkgdbdir=/var/db/pkg
mkfile=/etc/mk.conf mkfile=$sysconfdir/mk.conf
ignorecasecheck=no ignorecasecheck=no
ignoreusercheck=no ignoreusercheck=no
force=no force=no
@ -32,32 +33,33 @@ sedprog="sed"
case "$opsys" in case "$opsys" in
AIX) AIX)
mkfile=/usr/pkg/etc/mk.conf syscondir=$prefix/etc
pkgdbdir=/usr/pkg/pkgdb mkfile=$sysconfdir/mk.conf
pkgdbdir=$prefix/pkgdb
;; ;;
DragonFly) DragonFly)
# Don't use the ports /var/db/pkg # Don't use the ports /var/db/pkg
pkgdbdir=/usr/pkg/pkgdb pkgdbdir=$prefix/pkgdb
;; ;;
FreeBSD) FreeBSD)
# Don't use the ports /var/db/pkg # Don't use the ports /var/db/pkg
pkgdbdir=/usr/pkg/pkgdb pkgdbdir=$prefix/pkgdb
;; ;;
Interix) Interix)
mkfile=/etc/mk.conf.example mkfile=$sysconfdir/mk.conf.example
# Don't use the interopsystems.com package dir # Don't use the interopsystems.com package dir
pkgdbdir=/usr/pkg/pkgdb pkgdbdir=$prefix/pkgdb
ospro=i386 ospro=i386
;; ;;
NetBSD) NetBSD)
# Don't overwrite the system's mk.conf # Don't overwrite the system's mk.conf
mkfile=/etc/mk.conf.example mkfile=$sysconfdir/mk.conf.example
;; ;;
OpenBSD) OpenBSD)
# Don't overwrite the system's mk.conf # Don't overwrite the system's mk.conf
mkfile=/etc/mk.conf.example mkfile=$sysconfdir/mk.conf.example
# Don't use the ports /var/db/pkg # Don't use the ports /var/db/pkg
pkgdbdir=/usr/pkg/pkgdb pkgdbdir=$prefix/pkgdb
# Use "arch -s" instead of uname -p # Use "arch -s" instead of uname -p
ospro=`arch -s` ospro=`arch -s`
;; ;;
@ -133,6 +135,7 @@ $strip "$prefix/"sbin/*
echo "Making binary kit." echo "Making binary kit."
PATH="$prefix/bin:$PATH"; export PATH # in case tar was built by bootstrap PATH="$prefix/bin:$PATH"; export PATH # in case tar was built by bootstrap
[ ! -d $sysconfdir ] && mkdir -p $sysconfdir
cp ${wrkdir}/mk.conf.example $mkfile && \ cp ${wrkdir}/mk.conf.example $mkfile && \
cd / && \ cd / && \
tar -hcf "$targetdir/bootstrap-pkgsrc-$opsys-$osrev-$ospro-$date.tar" \ tar -hcf "$targetdir/bootstrap-pkgsrc-$opsys-$osrev-$ospro-$date.tar" \