summaryrefslogtreecommitdiff
path: root/sys-boot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:01:43 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:01:43 +0000
commitc9bfec0fb3ac5ef91f9e283c6fdb0c11d6ae6273 (patch)
treeaff46262e4df740ceb03b86a7c7ff877182cce30 /sys-boot
parentc6ffc00d10c23153d611893bf295b86a91046a95 (diff)
sys-boot/grub-config-redcore : revision bump
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub-config-redcore/grub-config-redcore-1337-r1.ebuild (renamed from sys-boot/grub-config-redcore/grub-config-redcore-1337.ebuild)19
1 files changed, 7 insertions, 12 deletions
diff --git a/sys-boot/grub-config-redcore/grub-config-redcore-1337.ebuild b/sys-boot/grub-config-redcore/grub-config-redcore-1337-r1.ebuild
index baf5cf85..901e9925 100644
--- a/sys-boot/grub-config-redcore/grub-config-redcore-1337.ebuild
+++ b/sys-boot/grub-config-redcore/grub-config-redcore-1337-r1.ebuild
@@ -17,24 +17,19 @@ RDEPEND="sys-boot/grub"
S="${FILESDIR}"
-pkg_preinst() {
- # Backup GRUB configuration file
- if [[ -f ""${ROOT}"etc/default/grub" ]]; then
- cp -avx ""${ROOT}"etc/default/grub" ""${ROOT}"etc/default/grub.backup"
- fi
-}
-
src_install() {
- # if we overwrite /etc/default/grub we may break users setup
- # so install the new GRUB configuration file as example only
dodir "etc/default" || die
insinto "etc/default" || die
newins grub grub.example || die
}
+pkg_preinst() {
+ if [[ -f ""${ROOT}"etc/default/grub" ]]; then
+ mv ""${ROOT}"etc/default/grub" ""${ROOT}"etc/default/grub.bak"
+ fi
+
pkg_postinst() {
- # Restore GRUB configuration file
- if [[ -f ""${ROOT}"etc/default/grub.backup" ]]; then
- cp -avx ""${ROOT}"etc/default/grub.backup" ""${ROOT}"etc/default/grub"
+ if [[ -f ""${ROOT}"etc/default/grub.bak" ]]; then
+ mv ""${ROOT}"etc/default/grub.bak" ""${ROOT}"etc/default/grub"
fi
}