Remove weekly directory
Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
parent
e24e331fa3
commit
8407af57f5
313 changed files with 162 additions and 162 deletions
88
releases/scripts/cloud-prep.sh
Normal file
88
releases/scripts/cloud-prep.sh
Normal file
|
@ -0,0 +1,88 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set timezone
|
||||
echo 'UTC' > /etc/timezone
|
||||
|
||||
# Set locale
|
||||
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
|
||||
echo 'en_US ISO-8859-1' >> /etc/locale.gen
|
||||
locale-gen -q
|
||||
eselect locale set en_US.utf8
|
||||
|
||||
# Some rootfs stuff
|
||||
grep -v rootfs /proc/mounts > /etc/mtab
|
||||
|
||||
# This is set in rackspaces prep, might help us
|
||||
echo 'net.ipv4.conf.eth0.arp_notify = 1' >> /etc/sysctl.conf
|
||||
echo 'vm.swappiness = 0' >> /etc/sysctl.conf
|
||||
|
||||
# Let's configure our grub
|
||||
# Access on both regular tty and serial console
|
||||
mkdir /boot/grub
|
||||
cat >>/etc/default/grub <<EOF
|
||||
GRUB_TERMINAL='serial console'
|
||||
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
|
||||
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
|
||||
EOF
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
sed -r -i 's/loop[0-9]+p1/LABEL\=cloudimg-rootfs/g' /boot/grub/grub.cfg
|
||||
sed -i 's/root=.*\ ro/root=LABEL\=cloudimg-rootfs\ ro/' /boot/grub/grub.cfg
|
||||
|
||||
# And the fstab
|
||||
echo 'LABEL=cloudimg-rootfs / ext4 defaults 0 0' > /etc/fstab
|
||||
|
||||
# allow the console log
|
||||
sed -i 's/#s0/s0/g' /etc/inittab
|
||||
|
||||
# let ipv6 use normal slaac
|
||||
sed -i 's/slaac/#slaac/g' /etc/dhcpcd.conf
|
||||
# don't let dhcpcd set domain name or hostname
|
||||
sed -i 's/domain_name\,\ domain_search\,\ host_name/domain_search/g' /etc/dhcpcd.conf
|
||||
|
||||
# need to do this here because it clobbers an openrc owned file
|
||||
cat > /etc/conf.d/hostname << "EOL"
|
||||
# Set to the hostname of this machine
|
||||
if [ -f /etc/hostname ];then
|
||||
hostname=$(cat /etc/hostname 2> /dev/null | cut -d"." -f1 2> /dev/null)
|
||||
else
|
||||
hostname="localhost"
|
||||
fi
|
||||
EOL
|
||||
chmod 0644 /etc/conf.d/hostname
|
||||
chown root:root /etc/conf.d/hostname
|
||||
|
||||
# set a nice default for /etc/resolv.conf
|
||||
cat > /etc/resolv.conf << EOL
|
||||
nameserver 8.8.8.8
|
||||
nameserver 2001:4860:4860::8888
|
||||
EOL
|
||||
|
||||
# let's upgrade (security fixes and otherwise)
|
||||
USE="-build" emerge -uDNv --with-bdeps=y --jobs=2 @world
|
||||
USE="-build" emerge --verbose=n --depclean
|
||||
USE="-build" emerge -v --usepkg=n @preserved-rebuild
|
||||
etc-update --automode -5
|
||||
|
||||
# Clean up portage
|
||||
emerge --verbose=n --depclean
|
||||
if [[ -a /usr/bin/eix ]]; then
|
||||
eix-update
|
||||
fi
|
||||
emaint all -f
|
||||
eselect news read all
|
||||
eclean-dist --destructive
|
||||
sed -i '/^USE=\"\${USE}\ \ build\"$/d' /etc/portage/make.conf
|
||||
echo 'PORTAGE_GPG_DIR="/var/lib/gentoo/gkeys/keyrings/gentoo/release"' >> /etc/portage/make.conf
|
||||
|
||||
# clean up system
|
||||
passwd -d root
|
||||
passwd -l root
|
||||
for i in $(find /var/log -type f); do truncate -s 0 $i; done
|
||||
# remove foreign manpages
|
||||
find /usr/share/man/ -mindepth 1 -maxdepth 1 -path "/usr/share/man/man*" -prune -o -exec rm -rf {} \;
|
||||
|
||||
# fine if this fails, aka non-hardened
|
||||
if [[ -x /usr/sbin/migrate-pax ]]; then
|
||||
echo 'migraging pax'
|
||||
/usr/sbin/migrate-pax -m
|
||||
fi
|
73
releases/scripts/livecd.sh
Normal file
73
releases/scripts/livecd.sh
Normal file
|
@ -0,0 +1,73 @@
|
|||
#!/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
|
||||
alpha)
|
||||
echo >> /etc/sysctl.conf
|
||||
echo "# Disable UAC on Alpha" >> /etc/sysctl.conf
|
||||
echo "kernel.uac.noprint = 1" >> /etc/sysctl.conf
|
||||
;;
|
||||
i?86|x86_64)
|
||||
sed -i 's/DRIVER fbdev/DRIVER vesa/' /usr/share/hwdata/Cards
|
||||
;;
|
||||
esac
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
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 /usr/portage tmpfs defaults 0 0" >> /etc/fstab
|
||||
#echo "tmpfs /boot tmpfs defaults 0 0" >> /etc/fstab
|
||||
|
||||
# pull /boot from the CD
|
||||
cd /boot && ls -1 | grep -v boot > /usr/livecd/bootfiles.txt
|
||||
mv -f System.map* /usr/livecd
|
||||
rm -rf /boot/*
|
||||
cat << 'EOF' >> /etc/conf.d/local.start
|
||||
if [ -n "$(ls /mnt/cdrom)" ]
|
||||
then
|
||||
rm /boot
|
||||
mkdir /boot
|
||||
mount -t tmpfs tmpfs /boot
|
||||
INITRAMFS=`ls -1 /mnt/cdrom/{boot,isolinux}/*.igz 2>/dev/null | head -n 1`
|
||||
KERNEL=${INITRAMFS/.igz/}
|
||||
initramfs=`grep initr /usr/livecd/bootfiles.txt | head -n 1`
|
||||
kernel=`grep '^kernel-' /usr/livecd/bootfiles.txt | head -n 1`
|
||||
cp -f ${INITRAMFS} /boot/${initramfs}
|
||||
cp -f ${KERNEL} /boot/${kernel}
|
||||
cp -f /usr/livecd/System.map* /boot
|
||||
fi
|
||||
EOF
|
||||
|
||||
#[ -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
|
||||
|
||||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue