[molecules] add Sabayon "Hardened Server" spec files

This commit is contained in:
Fabio Erculiani
2012-08-30 18:22:53 +02:00
parent 533b167775
commit 9cf8d7bd50
6 changed files with 149 additions and 0 deletions

View File

@@ -20,6 +20,13 @@ elif [ "${remaster_type}" = "ServerBase" ]; then
cp "${boot_kernel}" "${CDROOT_DIR}/boot/sabayon" || exit 1
cp "${boot_ramfs}" "${CDROOT_DIR}/boot/sabayon.igz" || exit 1
isolinux_source="${SABAYON_MOLECULE_HOME}/remaster/serverbase_isolinux.cfg"
elif [ "${remaster_type}" = "HardenedServer" ]; then
echo "HardenedServer trigger, copying server kernel over"
boot_kernel=$(find "${CHROOT_DIR}/boot" -name "kernel-*" | sort | head -n 1)
boot_ramfs=$(find "${CHROOT_DIR}/boot" -name "initramfs-*" | sort | head -n 1)
cp "${boot_kernel}" "${CDROOT_DIR}/boot/sabayon" || exit 1
cp "${boot_ramfs}" "${CDROOT_DIR}/boot/sabayon.igz" || exit 1
isolinux_source="${SABAYON_MOLECULE_HOME}/remaster/hardenedserver_isolinux.cfg"
fi
cp "${isolinux_source}" "${isolinux_destination}" || exit 1

View File

@@ -0,0 +1,32 @@
#!/bin/sh
rc-update del installer-gui boot
rc-update del x-setup boot
rc-update del hald boot
rc-update del avahi-daemon default
# A RUNNING NetworkManager is required by Anaconda !!
# re-enable rc_hotplug
# sed -i 's:^rc_hotplug=.*:rc_hotplug="*":g' /etc/rc.conf
# rc-update del NetworkManager default
# install-data dir is really not needed
rm -rf /install-data
mount -t proc proc /proc
/lib/rc/bin/rc-depend -u
# Generate openrc cache
touch /lib/rc/init.d/softlevel
/etc/init.d/savecache start
/etc/init.d/savecache zap
ldconfig
ldconfig
umount /proc
emaint --fix world
rm -rf /var/lib/entropy/*cache*
exit 0