From a06853168a40baad5fa2295c26ddb49d4152676c Mon Sep 17 00:00:00 2001 From: Bensong Liu <bensl@microsoft.com> Date: Tue, 5 Oct 2021 17:18:39 +0800 Subject: [PATCH] adjust msg --- README.md | 12 ++++++++++++ aur/PKGBUILD | 9 +++++---- aur/shared-bootdir-helper.install | 9 +++++---- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a619d74..ab2b618 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,18 @@ This package will do NOTHING if you skipped the configuration. 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. +## 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. + +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. + +Lastly, you need to run `grub-mkconfig -o /boot/grub/grub.cfg` again. Now you have successfully configured this tool! Enjoy and forget it! + +You need to do nothing while upgrading your kernel in the future, because the kimage filename would not be changed. Just do what you usually do. + ## Support status ### Distributions diff --git a/aur/PKGBUILD b/aur/PKGBUILD index c3345db..33a185e 100644 --- a/aur/PKGBUILD +++ b/aur/PKGBUILD @@ -21,10 +21,11 @@ sha256sums=( package() { cd "$pkgname" - mkdir -p "$pkgdir/etc" "$pkgdir/usr/bin" "$pkgdir/usr/share/libalpm/hooks" && - cp src/*.cfg "$pkgdir/etc/" && - cp src/*.sh "$pkgdir/usr/bin/" && - cp src/*.hook "$pkgdir/usr/share/libalpm/hooks/" || + mkdir -p "$pkgdir/etc" "$pkgdir/usr/bin" "$pkgdir/usr/share/libalpm/hooks" "$pkgdir/usr/share/libalpm/scripts" && + mv src/*.cfg "$pkgdir/etc/" && + mv src/hook-*.sh "$pkgdir/usr/share/libalpm/scripts/" && + mv src/*.sh "$pkgdir/usr/bin/" && + mv src/*.hook "$pkgdir/usr/share/libalpm/hooks/" || return $? } diff --git a/aur/shared-bootdir-helper.install b/aur/shared-bootdir-helper.install index a3e948c..ae995ad 100644 --- a/aur/shared-bootdir-helper.install +++ b/aur/shared-bootdir-helper.install @@ -2,12 +2,13 @@ post_install() { echo "***********************************shared-bootdir-helper**************************************" + echo "ATTENTION! You need to re-install kernel, and re-run grub-mkconfig to make me working. " + echo " you can read https://git.recolic.net/root/shared-bootdir-helper for more information. " + echo "" + echo "What's more: " echo "If you want to boot each kernel with different kernel parameters, " echo " you need to use the tool 'shared-bootdir-helper-multi-kparam'. " - echo " You MUST read https://git.recolic.net/root/shared-bootdir-helper " - echo "" - echo "If you're ok to boot each kernel with the same kernel parameters (in /etc/default/grub), " - echo " you need to do nothing. " + echo " You MUST read https://git.recolic.net/root/shared-bootdir-helper in this case. " echo "**********************************************************************************************" } -- GitLab