[molecules] add Sabayon "Hardened Server" spec files
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
32
scripts/remaster_hardenedserver_inner_chroot_script_after.sh
Executable file
32
scripts/remaster_hardenedserver_inner_chroot_script_after.sh
Executable 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
|
||||
Reference in New Issue
Block a user