diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-09-28 18:36:13 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-09-28 18:36:13 +0100 |
commit | 9d7df0cb808d7cef8c5dbb57bb2903543643992f (patch) | |
tree | 45afa5b6858c851001bcee61c05e0dd0a68db0a3 /packages/sys-boot | |
parent | eee04575cbc8e0a8b938c0e899be7f7e22d8546d (diff) |
sys-boot/dracut-config-redcore : don't rely on eclectic config for /etc/dracut.conf.d/redcore-dracut.conf
Diffstat (limited to 'packages/sys-boot')
-rw-r--r-- | packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0 (renamed from packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r1.exheres-0) | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r1.exheres-0 b/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0 index f719e3a..e1019a8 100644 --- a/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r1.exheres-0 +++ b/packages/sys-boot/dracut-config-redcore/dracut-config-redcore-1337-r2.exheres-0 @@ -37,5 +37,21 @@ src_compile() { src_install() { dodir /etc/dracut.conf.d insinto /etc/dracut.conf.d - doins "${FILES}"/redcore-dracut.conf + 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 } |