From 263ecfa48b61d3830d743cce581b0a99458d36b4 Mon Sep 17 00:00:00 2001 From: Recolic Keghart <root@recolic.net> Date: Tue, 12 Oct 2021 01:38:02 +0800 Subject: [PATCH] bugfree --- README.md | 10 +++------- aur/PKGBUILD | 2 +- aur/shared-bootdir-helper.install | 3 +++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ab2b618..7a0664b 100644 --- a/README.md +++ b/README.md @@ -24,21 +24,17 @@ GRUB is managing kernel parameters. - What does this package do for you -1. Provide a tool to modify the generated `/boot/grub/grub.cfg`. -2. Add a post-transaction hook after `grub-mkconfig`, to automatically run that tool for you. - -This package will do NOTHING if you skipped the configuration. +Modify `/usr/bin/grub-mkconfig` and add a post-transaction hook after `grub-mkconfig`, to automatically modify /boot/grub/grub.cfg for you. - What should you do -1. Modify `/etc/default/grub`, to set `GRUB_CMDLINE_LINUX_DEFAULT="__KERNEL_PARAMETER_MANAGED_BY_HELPER"`. -2. Modify file `/etc/shared-bootdir-helper-multi-kparam.cfg`, to set kernel parameters for each hostname. +Modify file `/etc/shared-bootdir-helper-multi-kparam.cfg`, to set kernel parameters for each hostname. ## Usage Firstly, install this package. -Secondly, if you only want to solve problem 1, you do nothing in this step. If you want to solve problem 2, follow the "What should you do" guide in Problem2. +Secondly, modify `/etc/shared-bootdir-helper-multi-kparam.cfg` to solve problem 2. Thirdly, you must re-install your kernel. You may want to run `pacman -S linux`, `pacman -S linux-lts`, `pacman -S linux-surface`, or something like this. diff --git a/aur/PKGBUILD b/aur/PKGBUILD index 7fbc40d..cb0020f 100644 --- a/aur/PKGBUILD +++ b/aur/PKGBUILD @@ -4,7 +4,7 @@ pkgname=shared-bootdir-helper pkgver=1.2 -pkgrel=1 +pkgrel=2 pkgdesc="Allow multiple linux installations to share the same /boot directory, even with different kernel parameters. " url="https://git.recolic.net/root/$pkgname" license=("GPL3") diff --git a/aur/shared-bootdir-helper.install b/aur/shared-bootdir-helper.install index ae995ad..77a9fda 100644 --- a/aur/shared-bootdir-helper.install +++ b/aur/shared-bootdir-helper.install @@ -10,6 +10,9 @@ post_install() { echo " you need to use the tool 'shared-bootdir-helper-multi-kparam'. " echo " You MUST read https://git.recolic.net/root/shared-bootdir-helper in this case. " echo "**********************************************************************************************" + + echo '' >> /usr/bin/grub-mkconfig + echo '[ -f /usr/bin/shared-bootdir-helper-multi-kparam.sh ] && echo "Executing addon: /usr/bin/shared-bootdir-helper-multi-kparam.sh $grub_cfg" && /usr/bin/shared-bootdir-helper-multi-kparam.sh "$grub_cfg" && exit $?' >> /usr/bin/grub-mkconfig } -- GitLab