Merge branch 'master' of ssh://git.fedorahosted.org/git/spin-kickstarts

This commit is contained in:
Joerg (kital) Simon 2011-03-02 09:07:25 +01:00
commit eccde60155
4 changed files with 4 additions and 138 deletions

View File

@ -1,113 +0,0 @@
# Build a basic Fedora 14 AMI
lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --disabled
bootloader --timeout=1
network --bootproto=dhcp --device=eth0 --onboot=on
services --enabled=network,ssh
# By default the root password is emptied
#
# Define how large you want your rootfs to be
# NOTE: S3-backed AMIs have a limit of 10G
#
part / --size 10000 --fstype ext3 --ondisk sda
#
# Repositories
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-15&arch=$basearch
#
#
# Add all the packages after the base packages
#
%packages --excludedocs --nobase --instLangs=en
@core
system-config-securitylevel-tui
audit
pciutils
bash
coreutils
kernel
grub
e2fsprogs
passwd
policycoreutils
chkconfig
rootfiles
yum
vim-minimal
acpid
openssh-clients
openssh-server
curl
sudo
#Allow for dhcp access
dhclient
iputils
%end
# more ec2-ify
%post --erroronfail
# disable root password based login
cat >> /etc/ssh/sshd_config << EOF
PermitRootLogin no
PasswordAuthentication no
UseDNS no
EOF
# create ec2-user
/usr/sbin/useradd ec2-user
/bin/echo -e 'ec2-user\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
# set up ssh key fetching
cat >> /etc/rc.local << EOF
if [ ! -d /home/ec2-user/.ssh ]; then
mkdir -p /home/ec2-user/.ssh
chmod 700 /home/ec2-user/.ssh
fi
# Fetch public key using HTTP
while [ ! -f /home/ec2-user/.ssh/authorized_keys ]; do
curl -f http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key > /tmp/aws-key 2>/dev/null
if [ \$? -eq 0 ]; then
cat /tmp/aws-key >> /home/ec2-user/.ssh/authorized_keys
chmod 0600 /home/ec2-user/.ssh/authorized_keys
restorecon /home/ec2-user/.ssh/authorized_keys
rm -f /tmp/aws-key
echo "Successfully retrieved AWS public key from instance metadata"
else
FAILED=\$((\$FAILED + 1))
if [ \$FAILED -ge \$ATTEMPTS ]; then
echo "Failed to retrieve AWS public key after \$FAILED attempts, quitting"
break
fi
echo "Could not retrieve AWS public key (attempt #\$FAILED/\$ATTEMPTS), retrying in 5 seconds..."
sleep 5
fi
done
# make sure firstboot doesn't start
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
if [ ! -d /lib64 ] ; then
cat <<EOL >> /etc/fstab
/dev/xvda3 swap swap defaults 0 0
EOL
# workaround xen performance issue (bz 651861)
echo "hwcap 1 nosegneg" > /etc/ld.so.conf.d/libc6-xen.conf
fi
%end

View File

@ -196,26 +196,13 @@ chkconfig --level 345 mdmonitor off 2>/dev/null
# turn off setroubleshoot on the live image to preserve resources # turn off setroubleshoot on the live image to preserve resources
chkconfig --level 345 setroubleshoot off 2>/dev/null chkconfig --level 345 setroubleshoot off 2>/dev/null
# don't do packagekit checking by default # don't enable the gnome-settings-daemon packagekit plugin
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_updates never >/dev/null gsettings set org.gnome.settings-daemon.plugins.updates active 'false'
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_upgrades never >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_refresh_cache never >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_available false >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_distro_upgrades false >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_mime_type_helper false >/dev/null
# don't start cron/at as they tend to spawn things which are # don't start cron/at as they tend to spawn things which are
# disk intensive that are painful on a live image # disk intensive that are painful on a live image
chkconfig --level 345 crond off 2>/dev/null chkconfig --level 345 crond off 2>/dev/null
chkconfig --level 345 atd off 2>/dev/null chkconfig --level 345 atd off 2>/dev/null
chkconfig --level 345 anacron off 2>/dev/null
chkconfig --level 345 readahead_early off 2>/dev/null
chkconfig --level 345 readahead_later off 2>/dev/null
# Stopgap fix for RH #217966; should be fixed in HAL instead # Stopgap fix for RH #217966; should be fixed in HAL instead
touch /media/.hal-mtab touch /media/.hal-mtab
@ -324,8 +311,7 @@ rm -f /boot/initramfs*
rm -f /core* rm -f /core*
# convince readahead not to collect # convince readahead not to collect
rm -f /.readahead_collect # FIXME: for systemd
touch /var/lib/readahead/early.sorted
%end %end

View File

@ -40,10 +40,6 @@ cp /usr/share/applications/liveinst.desktop /home/liveuser/Desktop
chown -R liveuser.liveuser /home/liveuser/Desktop chown -R liveuser.liveuser /home/liveuser/Desktop
chmod a+x /home/liveuser/Desktop/liveinst.desktop chmod a+x /home/liveuser/Desktop/liveinst.desktop
# But not trash and home
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/nautilus/desktop/trash_icon_visible false >/dev/null
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/nautilus/desktop/home_icon_visible false >/dev/null
# Turn off PackageKit-command-not-found while uninstalled # Turn off PackageKit-command-not-found while uninstalled
sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf

View File

@ -281,8 +281,6 @@ gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults
# disk intensive that are painful on a live image # disk intensive that are painful on a live image
chkconfig --level 345 crond off 2>/dev/null chkconfig --level 345 crond off 2>/dev/null
chkconfig --level 345 atd off 2>/dev/null chkconfig --level 345 atd off 2>/dev/null
chkconfig --level 345 readahead_early off 2>/dev/null
chkconfig --level 345 readahead_later off 2>/dev/null
# Stopgap fix for RH #217966; should be fixed in HAL instead # Stopgap fix for RH #217966; should be fixed in HAL instead
touch /media/.hal-mtab touch /media/.hal-mtab
@ -386,8 +384,7 @@ rm -f /boot/initrd*
rm -f /core* rm -f /core*
# convince readahead not to collect # convince readahead not to collect
rm -f /.readahead_collect # FIXME: for systemd
touch /var/lib/readahead/early.sorted
%end %end