xbps-src: do some checks in the chroot for /run related stuff.

This commit is contained in:
Juan RP 2011-06-20 18:32:43 +02:00
parent d2ad1c2b12
commit 24617c38ee
1 changed files with 9 additions and 1 deletions

View File

@ -93,7 +93,7 @@ echo "# End of configuration file." >> $XBPSSRC_CF
if [ -d $XBPS_MASTERDIR/tmp ]; then
if [ ! -f $XBPS_MASTERDIR/.xbps_mount_bind_done ]; then
msg_normal "Cleaning up /tmp...\n"
rm -rf $XBPS_MASTERDIR/tmp/*
[ -h ${XBPS_MASTERDIR}/tmp ] || rm -rf $XBPS_MASTERDIR/tmp/*
fi
fi
@ -101,6 +101,14 @@ prepare_chroot()
{
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