xbps-src: create masterdir/boot dir if doesn't exist.

This commit is contained in:
Juan RP 2011-11-08 12:35:45 +01:00
parent a12af0a8b7
commit 966b16760d

View File

@ -118,16 +118,8 @@ _EOF
prepare_chroot()
{
local f=
local f
if [ -h ${XBPS_MASTERDIR}/tmp ]; then
rm -f ${XBPS_MASTERDIR}/tmp
mkdir ${XBPS_MASTERDIR}/tmp
fi
if [ -h ${XBPS_MASTERDIR}/var/run ]; then
rm -f ${XBPS_MASTERDIR}/var/run
mkdir -p ${XBPS_MASTERDIR}/var/run
fi
# Create some required files.
cp -f /etc/mtab $XBPS_MASTERDIR/etc
cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc
@ -139,6 +131,7 @@ prepare_chroot()
for f in run/utmp log/lastlog; do
chmod 644 $XBPS_MASTERDIR/var/$f
done
[ ! -d $XBPS_MASTERDIR/boot ] && mkdir -p $XBPS_MASTERDIR/boot
cat > $XBPS_MASTERDIR/etc/passwd <<_EOF
root:x:0:0:root:/root:/bin/bash