From c464f084ed2f4328f94d7233cd843ed5f0396800 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 16 Dec 2008 05:07:14 +0100 Subject: [PATCH] chroot.sh: add some missing files in /var/log. --HG-- extra : convert_revision : 77cc4113c23fe9b00516261e12c0ae002e4831a4 --- utils/sh/chroot.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/sh/chroot.sh b/utils/sh/chroot.sh index 175e70249d..243aed7485 100644 --- a/utils/sh/chroot.sh +++ b/utils/sh/chroot.sh @@ -54,9 +54,18 @@ prepare_chroot() for f in lock log mail run spool opt cache lib; do mkdir -p $XBPS_MASTERDIR/var/$f done + chown -R root:root $XBPS_MASTERDIR # Create some required files. + touch $XBPS_MASTERDIR/etc/mtab + for f in run/utmp log/btmp log/lastlog log/wtmp; do + touch -f $XBPS_MASTERDIR/var/$f + done + for f in run/utmp log/lastlog; do + chmod 644 $XBPS_MASTERDIR/var/$f + done + cat > $XBPS_MASTERDIR/etc/passwd <<_EOF root:x:0:0:root:/root:/bin/bash nobody:x:99:99:Unprivileged User:/dev/null:/bin/false