summarylogtreecommitdiffstats
path: root/grub-initrd-generation-fix
diff options
context:
space:
mode:
authorTNE2022-04-15 16:48:24 +0200
committerTNE2022-04-15 16:49:14 +0200
commit3394486d52a1760167f79ef5304dafe79e578441 (patch)
tree5fdab7de3386886b53e240bde62fa9e7dd44781e /grub-initrd-generation-fix
parent9996fe5c2e79199554f8e4796fce963054ab1ddd (diff)
downloadaur-os-prober-btrfs.tar.gz
Fix pkgbuild
Diffstat (limited to 'grub-initrd-generation-fix')
-rwxr-xr-xgrub-initrd-generation-fix39
1 files changed, 3 insertions, 36 deletions
diff --git a/grub-initrd-generation-fix b/grub-initrd-generation-fix
index b2898a31842b..c0b33c646038 100755
--- a/grub-initrd-generation-fix
+++ b/grub-initrd-generation-fix
@@ -1,39 +1,6 @@
#!/bin/bash
-30_os-prober() {
- local file=/etc/grub.d/30_os-prober # from package 'grub'
-
- sed -i $file \
- -e "s|\(echo \${LINUX} \| cut -d ':' -f 5\)\`|\1 \| tr '^' ' '\`|" \
- -e 's|LINITRD="${LINITRD#/boot}"$|LINITRD=$(echo "$LINITRD" \| sed -e "s\|/boot/\|/\|g")|' # remove /boot
-}
-
-40grub2() {
- local file=/usr/lib/linux-boot-probes/mounted/40grub2 # from package 'os-prober'
-
- # use all (but first) parameters:
- local c1='s|initrd="$(echo "$2"|shift; initrd="$(echo "$@"|'
-
- # add prefix /boot:
- local c2='s|initrd="/boot$initrd"|initrd=$(echo "$initrd" \| sed -e "s\|^/\|/boot/\|" -e "s\| /\| /boot/\|g")|'
-
- sed -i $file -e "$c1" -e "$c2"
-
-
-}
-
-Main()
-{
- local hookname="$1"
-
- case "$hookname" in
- 30_os-prober) 30_os-prober ;;
- 40grub2) 40grub2 ;;
- "") 30_os-prober
- 40grub2
- ;;
- esac
-}
-
-Main "$@"
+sed -i /etc/grub.d/30_os-prober \
+ -e "s|\(echo \${LINUX} \| cut -d ':' -f 5\)\`|\1 \| tr '^' ' '\`|" \
+ -e 's|LINITRD="${LINITRD#/boot}"$|LINITRD=$(echo "$LINITRD" \| sed -e "s\|/boot/\|/\|g")|' # remove /boot