From 9d7df0cb808d7cef8c5dbb57bb2903543643992f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 28 Sep 2018 18:36:13 +0100 Subject: sys-boot/dracut-config-redcore : don't rely on eclectic config for /etc/dracut.conf.d/redcore-dracut.conf --- .../dracut-config-redcore-1337-r2.exheres-0 | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0 (limited to 'packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0') diff --git a/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0 b/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0 new file mode 100644 index 0000000..e1019a8 --- /dev/null +++ b/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0 @@ -0,0 +1,57 @@ +# Copyright 2018 Redcore Linux Project +# Distributed under the terms of the GNU General Public License v2 + +SUMMARY="Redcore Linux Project dracut config" +DESCRIPTION="Dracut configuration file for Redcore Linux Project" +HOMEPAGE="https://redcorelinux.org" + +LICENCES="GPL-2" +SLOT="0" +PLATFORMS="~amd64" +MYOPTIONS="" + +DEPENDENCIES=" + run: + firmware/intel-microcode [[ + description = [ early microcode for Intel CPU's ] + ]] + firmware/linux-firmware [[ + description = [ early microcode for AMD CPU's ] + ]] +" + +WORK="${FILES}" + +src_prepare() { + : +} + +src_configure() { + : +} + +src_compile() { + : +} + +src_install() { + dodir /etc/dracut.conf.d + insinto /etc/dracut.conf.d + newins "${FILES}"/redcore-dracut.conf redcore-dracut.conf.example +} + +pkg_preinst() { + if [[ -f ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf" ]]; then + edo mv ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf" ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf.bak" + fi +} + +pkg_postinst() { + if [[ ! -f ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf" ]]; then + edo cp -avx ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf.example" ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf" + fi + + if [[ -f ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf.bak" ]]; then + edo mv ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf.bak" ""${ROOT}"etc/dracut.conf.d/redcore-dracut.conf" + fi +} -- cgit v1.2.3