Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: /
Date: Wed, 02 Oct 2019 22:45:35
Message-Id: 1570019354.80cb0abc18d2ff9143f657c960eebd7aa082f61a.whissi@gentoo
1 commit: 80cb0abc18d2ff9143f657c960eebd7aa082f61a
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 2 12:29:14 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 2 12:29:14 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=80cb0abc
7
8 gen_cmdline.sh: Move --bootloader validation to determine_real_args()
9
10 This will allow us to always validate set bootloader at a single place.
11
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 gen_cmdline.sh | 7 -------
15 gen_determineargs.sh | 8 ++++++++
16 2 files changed, 8 insertions(+), 7 deletions(-)
17
18 diff --git a/gen_cmdline.sh b/gen_cmdline.sh
19 index d74c8f8..825b80c 100755
20 --- a/gen_cmdline.sh
21 +++ b/gen_cmdline.sh
22 @@ -443,13 +443,6 @@ parse_cmdline() {
23 --bootloader=*)
24 CMD_BOOTLOADER="${*#*=}"
25 [ -z "${CMD_BOOTLOADER}" ] && CMD_BOOTLOADER="no"
26 - case "${CMD_BOOTLOADER}" in
27 - no|grub|grub2)
28 - ;;
29 - *)
30 - echo "Error: Bootloader '${CMD_BOOTLOADER}' is unsupported."
31 - exit 1
32 - esac
33 print_info 3 "CMD_BOOTLOADER: ${CMD_BOOTLOADER}"
34 ;;
35 --no-bootloader)
36
37 diff --git a/gen_determineargs.sh b/gen_determineargs.sh
38 index 28590d3..5b43160 100755
39 --- a/gen_determineargs.sh
40 +++ b/gen_determineargs.sh
41 @@ -557,6 +557,14 @@ determine_real_args() {
42 fi
43 fi
44
45 + case "${BOOTLOADER}" in
46 + no|grub|grub2)
47 + ;;
48 + *)
49 + gen_die "Invalid bootloader '${BOOTLOADER}'; --bootloader=<bootloader> requires one of: no, grub, grub2"
50 + ;;
51 + esac
52 +
53 if isTrue "${KERNEL_SOURCES}"
54 then
55 if [ ! -d ${KERNEL_DIR} ]