molecule: add inner chroot script example

git-svn-id: http://svn.sabayonlinux.org/projects/molecule/trunk@3138 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2009-03-10 15:28:14 +00:00
parent 551fc67c31
commit 624a3acdde
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
/usr/sbin/env-update
source /etc/profile
# allow root logins to the livecd by default
# turn bashlogin shells to actual login shells
sed -i 's:exec -l /bin/bash:exec -l /bin/bash -l:' /bin/bashlogin
# setup sudoers
[ -e /etc/sudoers ] && sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
# setup opengl in /etc (if configured)
eselect opengl set xorg-x11
# touch /etc/asound.state
touch /etc/asound.state
update-pciids
update-usbids
# Prepare NVIDIA legacy drivers infrastructure
if [ ! -d "/install-data/drivers" ]; then
mkdir -p /install-data/drivers
fi
myuname=$(uname -m)
mydir="x86"
if [ "$myuname" == "x86_64" ]; then
mydir="amd64"
fi
ACCEPT_LICENSE="NVIDIA" equo install --fetch --nodeps =x11-drivers/nvidia-drivers-173*
ACCEPT_LICENSE="NVIDIA" equo install --fetch --nodeps =x11-drivers/nvidia-drivers-96*
# dropped since no X 1.5 support yet
# ACCEPT_LICENSE="NVIDIA" equo install --fetch --nodeps ~x11-drivers/nvidia-drivers-71.86.07
mv /var/lib/entropy/packages/${mydir}/4/x11-drivers\:nvidia-drivers*.tbz2 /install-data/drivers/
echo -5 | etc-update
/lib/rc/bin/rc-depend -u