chroot: do not overwrite some files installed by the shadow binpkg.
--HG-- extra : convert_revision : 104a16f5e01c2ec161da3991130dda276f2f798b
This commit is contained in:
parent
7e677c32d9
commit
97b2fa55e2
1 changed files with 15 additions and 4 deletions
|
@ -46,12 +46,16 @@ prepare_chroot()
|
||||||
chmod 644 $XBPS_MASTERDIR/var/$f
|
chmod 644 $XBPS_MASTERDIR/var/$f
|
||||||
done
|
done
|
||||||
|
|
||||||
cat > $XBPS_MASTERDIR/etc/passwd <<_EOF
|
if [ ! -f $XBPS_MASTERDIR/etc/passwd ]; then
|
||||||
|
cat > $XBPS_MASTERDIR/etc/passwd <<_EOF
|
||||||
root:x:0:0:root:/root:/bin/bash
|
root:x:0:0:root:/root:/bin/bash
|
||||||
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
|
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
|
||||||
_EOF
|
_EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# Default group list as specified by LFS.
|
# Default group list as specified by LFS.
|
||||||
cat > $XBPS_MASTERDIR/etc/group <<_EOF
|
if [ ! -f $XBPS_MASTERDIR/etc/group ]; then
|
||||||
|
cat > $XBPS_MASTERDIR/etc/group <<_EOF
|
||||||
root:x:0:
|
root:x:0:
|
||||||
bin:x:1:
|
bin:x:1:
|
||||||
sys:x:2:
|
sys:x:2:
|
||||||
|
@ -72,8 +76,11 @@ mail:x:34:
|
||||||
nogroup:x:99:
|
nogroup:x:99:
|
||||||
users:x:1000:
|
users:x:1000:
|
||||||
_EOF
|
_EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# Default file as in Ubuntu.
|
# Default file as in Ubuntu.
|
||||||
cat > $XBPS_MASTERDIR/etc/hosts <<_EOF
|
if [ ! -f $XBPS_MASTERDIR/etc/hosts ]; then
|
||||||
|
cat > $XBPS_MASTERDIR/etc/hosts <<_EOF
|
||||||
127.0.0.1 xbps localhost.localdomain localhost
|
127.0.0.1 xbps localhost.localdomain localhost
|
||||||
127.0.1.1 xbps
|
127.0.1.1 xbps
|
||||||
|
|
||||||
|
@ -85,11 +92,15 @@ ff02::1 ip6-allnodes
|
||||||
ff02::2 ip6-allrouters
|
ff02::2 ip6-allrouters
|
||||||
ff02::3 ip6-allhosts
|
ff02::3 ip6-allhosts
|
||||||
_EOF
|
_EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# Use OpenDNS servers.
|
# Use OpenDNS servers.
|
||||||
cat > $XBPS_MASTERDIR/etc/resolv.conf <<_EOF
|
if [ ! -f $XBPS_MASTERDIR/etc/resolv.conf ]; then
|
||||||
|
cat > $XBPS_MASTERDIR/etc/resolv.conf <<_EOF
|
||||||
nameserver 208.67.222.222
|
nameserver 208.67.222.222
|
||||||
nameserver 208.67.220.220
|
nameserver 208.67.220.220
|
||||||
_EOF
|
_EOF
|
||||||
|
fi
|
||||||
|
|
||||||
touch $XBPS_MASTERDIR/.xbps_perms_done
|
touch $XBPS_MASTERDIR/.xbps_perms_done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue