aboutsummaryrefslogtreecommitdiffstats
path: root/main/grub/2.02_beta3-mkconfig-alpine.patch
blob: 7472d410a9e548fc27fb936a2e774c04d221112c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index de9044c..60f36be 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -21,8 +21,13 @@ prefix="@prefix@"
 exec_prefix="@exec_prefix@"
 datarootdir="@datarootdir@"
 
+if [ -f /etc/update-extlinux.conf ]; then
+	. /etc/update-extlinux.conf
+	GRUB_CMDLINE_LINUX_DEFAULT="modules=${modules} ${default_kernel_opts} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+fi
 . "$pkgdatadir/grub-mkconfig_lib"
 
+
 export TEXTDOMAIN=@PACKAGE@
 export TEXTDOMAINDIR="@localedir@"
 
@@ -31,7 +36,11 @@ CLASS="--class gnu-linux --class gnu --class os"
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
   OS=GNU/Linux
 else
-  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+  if [ "x${GRUB_DISTRIBUTOR}" = "xAlpine" ]; then
+    OS="${GRUB_DISTRIBUTOR} Linux"
+  else
+    OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+  fi
   CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
 fi
 
@@ -187,12 +196,14 @@ while [ "x$list" != "x" ] ; do
   version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
   alt_version=`echo $version | sed -e "s,\.old$,,g"`
   linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
+  tag="$(basename ${rel_dirname}/${basename} | cut -b9-)"
 
   initrd=
   for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
 	   "initrd-${version}" "initramfs-${version}.img" \
 	   "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
 	   "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+           "initramfs-${tag}" \
 	   "initramfs-genkernel-${version}" \
 	   "initramfs-genkernel-${alt_version}" \
 	   "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \