ci-test-sample/debian/patches/0079-show-correct-distro-na...

38 lines
2.0 KiB
Diff

From: =?utf-8?b?6LCi54Kc?= <xiewei@kylinos.cn>
Date: Thu, 20 Feb 2020 16:03:27 +0800
Subject: show correct distro name in grub.cfg
---
scripts/build/lb_binary_grub2-efi | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/scripts/build/lb_binary_grub2-efi b/scripts/build/lb_binary_grub2-efi
index 4b01daa..477fdb1 100644
--- a/scripts/build/lb_binary_grub2-efi
+++ b/scripts/build/lb_binary_grub2-efi
@@ -10,6 +10,7 @@ DESCRIPTION="$(Echo 'installs grub2 efi into binary')"
HELP=""
USAGE="${PROGRAM} [--force]"
ARCHITECTURE="$(echo ${LB_ARCHITECTURES} | sed -e 's| |/|g')"
+ORIGIN="$(echo $LB_ISO_VOLUME | cut -d '-' -f 1)"
Arguments "${@}"
@@ -191,12 +192,12 @@ DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
case ${ARCHITECTURE} in
'amd64')
- Grub_live_entry "Try Kylin without installing" "/casper/vmlinuz" "/casper/initrd.lz" "boot=casper locale=zh_CN quiet splash"
- Grub_live_entry "Install Kylin" "/casper/vmlinuz" "/casper/initrd.lz" "boot=casper only-ubiquity locale=zh_CN quiet splash"
+ Grub_live_entry "Try ${ORIGIN} without installing" "/casper/vmlinuz" "/casper/initrd.lz" "boot=casper locale=zh_CN quiet splash"
+ Grub_live_entry "Install ${ORIGIN}" "/casper/vmlinuz" "/casper/initrd.lz" "boot=casper only-ubiquity locale=zh_CN quiet splash"
;;
'arm64')
- Grub_live_entry "Try Kylin without installing" "/casper/Image" "/casper/initrd.img" "boot=casper rootwait ro locale=zh_CN KEYBOARDTYPE=pc KEYTABLE=us ignore_uuid quiet splash"
- Grub_live_entry "Install Kylin" "/casper/Image" "/casper/initrd.img" "boot=casper only-ubiquity rootwait ro locale=zh_CN KEYBOARDTYPE=pc KEYTABLE=us ignore_uuid quiet splash"
+ Grub_live_entry "Try ${ORIGIN} without installing" "/casper/Image" "/casper/initrd.img" "boot=casper rootwait ro locale=zh_CN KEYBOARDTYPE=pc KEYTABLE=us ignore_uuid quiet splash"
+ Grub_live_entry "Install ${ORIGIN}" "/casper/Image" "/casper/initrd.img" "boot=casper only-ubiquity rootwait ro locale=zh_CN KEYBOARDTYPE=pc KEYTABLE=us ignore_uuid quiet splash"
;;
esac