2008-02-01 07:13:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# This is where we will put any release-specific fsscript code
|
|
|
|
|
|
|
|
if [[ -e /etc/conf.d/clock ]]
|
|
|
|
then
|
|
|
|
sed -i -e 's/#TIMEZONE="Factory"/TIMEZONE="UTC"/' /etc/conf.d/clock
|
|
|
|
fi
|
|
|
|
|
|
|
|
case `uname -m` in
|
2008-02-28 20:34:39 +00:00
|
|
|
alpha)
|
|
|
|
echo >> /etc/sysctl.conf
|
|
|
|
echo "# Disable UAC on Alpha" >> /etc/sysctl.conf
|
2008-05-18 11:13:53 +00:00
|
|
|
echo "kernel.uac.noprint = 1" >> /etc/sysctl.conf
|
2008-02-28 20:34:39 +00:00
|
|
|
;;
|
2008-02-01 07:13:24 +00:00
|
|
|
i?86|x86_64)
|
|
|
|
sed -i 's/DRIVER fbdev/DRIVER vesa/' /usr/share/hwdata/Cards
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2008-02-28 20:34:39 +00:00
|
|
|
# Enforce a unicode font by default
|
|
|
|
sed -e 's/CONSOLEFONT="default8x16"/CONSOLEFONT="lat1-16"/' \
|
|
|
|
-e '/^#CONSOLETRANSLATION="8859-1_to_uni"/ s/^#//' \
|
|
|
|
-i /etc/conf.d/consolefont
|
|
|
|
|
2008-02-28 16:43:29 +00:00
|
|
|
# This is necessary because /home/gentoo in the squashfs ends up getting owned
|
|
|
|
# by whoever the owner of the overlay files were on the build box. This causes
|
|
|
|
# weird stuff to happen like X failing to start because it doesn't have the
|
|
|
|
# ability to write the .Xauthority file
|
|
|
|
if [[ -d /home/gentoo ]]
|
|
|
|
then
|
|
|
|
chown -R gentoo:users /home/gentoo
|
|
|
|
fi
|
2008-06-06 03:54:44 +00:00
|
|
|
|
|
|
|
echo "#####################################################" > /etc/fstab
|
|
|
|
echo "## ATTENTION: THIS IS THE FSTAB ON THE LIVECD ##" >> /etc/fstab
|
|
|
|
echo "## PLEASE EDIT THE FSTAB at /mnt/gentoo/etc/fstab ##" >> /etc/fstab
|
|
|
|
echo "#####################################################" >> /etc/fstab
|
|
|
|
|
|
|
|
# fstab tweaks
|
|
|
|
echo "tmpfs / tmpfs defaults 0 0" >> /etc/fstab
|
|
|
|
echo "tmpfs /lib/firmware tmpfs defaults 0 0" >> /etc/fstab
|
|
|
|
echo "tmpfs /usr/portage tmpfs defaults 0 0" >> /etc/fstab
|
2008-07-06 20:43:49 +00:00
|
|
|
#echo "tmpfs /boot tmpfs defaults 0 0" >> /etc/fstab
|
2008-06-06 03:54:44 +00:00
|
|
|
|
|
|
|
# pull /boot from the CD
|
|
|
|
cd /boot && ls -1 | grep -v boot > /usr/livecd/bootfiles.txt
|
|
|
|
mv -f System.map* /usr/livecd
|
2008-06-11 14:50:46 +00:00
|
|
|
rm -rf /boot/*
|
2008-06-30 18:32:30 +00:00
|
|
|
cat << 'EOF' >> /etc/conf.d/local.start
|
2008-06-06 04:04:00 +00:00
|
|
|
if [ -n "$(ls /mnt/cdrom)" ]
|
|
|
|
then
|
2008-07-06 20:43:49 +00:00
|
|
|
rm /boot
|
|
|
|
mkdir /boot
|
|
|
|
mount -t tmpfs tmpfs /boot
|
|
|
|
INITRAMFS=`ls -1 /mnt/cdrom/{boot,isolinux}/*.igz 2>/dev/null | head -n 1`
|
2008-06-30 20:17:38 +00:00
|
|
|
KERNEL=${INITRAMFS/.igz/}
|
2008-06-06 04:04:00 +00:00
|
|
|
initramfs=`grep initr /usr/livecd/bootfiles.txt | head -n 1`
|
2008-07-06 22:14:25 +00:00
|
|
|
kernel=`grep '^kernel-' /usr/livecd/bootfiles.txt | head -n 1`
|
2008-07-06 20:43:49 +00:00
|
|
|
cp -f ${INITRAMFS} /boot/${initramfs}
|
|
|
|
cp -f ${KERNEL} /boot/${kernel}
|
2008-06-11 14:50:46 +00:00
|
|
|
cp -f /usr/livecd/System.map* /boot
|
2008-06-06 04:04:00 +00:00
|
|
|
fi
|
2008-06-06 03:54:44 +00:00
|
|
|
EOF
|
|
|
|
|
2008-06-24 16:51:58 +00:00
|
|
|
#[ -x /usr/bin/ktelnet ] && ln -sf /usr/bin/ktelnet /usr/bin/telnet
|
|
|
|
#[ -x /usr/bin/kftp ] && ln -sf /usr/bin/kftp /usr/bin/ftp
|
|
|
|
|
|
|
|
# Remove DefaultColorDepth
|
|
|
|
[ -e /etc/X11/xorg.conf.in ] && sed -i -e '/DefaultColorDepth/d' /etc/X11/xorg.conf.in
|
|
|
|
|
2008-07-10 16:29:55 +00:00
|
|
|
# This is here so that the retval of the line above (which may be non-0
|
|
|
|
# even if everything is ok) is not the retval of the script which would
|
|
|
|
# make catalyst unhappy.
|
|
|
|
exit 0
|