Gentoo Archives: gentoo-catalyst

From: Christos Kotsi <christo.kotsi@×××××.com>
To: gentoo-catalyst@l.g.o
Cc: christo.kotsi@×××××.com
Subject: [gentoo-catalyst] [PATCH 4/6] Added some loops
Date: Wed, 12 Apr 2017 08:44:17
Message-Id: 20170412084349.2017-4-christo.kotsi@gmail.com
In Reply to: [gentoo-catalyst] [PATCH 1/6] Concentrated some cp commands by Christos Kotsi
1 ---
2 targets/support/bootloader-setup.sh | 24 +++++++++---------------
3 1 file changed, 9 insertions(+), 15 deletions(-)
4
5 diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
6 index d9e2620..97920e7 100755
7 --- a/targets/support/bootloader-setup.sh
8 +++ b/targets/support/bootloader-setup.sh
9 @@ -7,8 +7,7 @@ source ${clst_shdir}/support/filesystem-functions.sh
10
11 extract_cdtar $1
12 extract_kernels $1/boot
13 -check_bootargs
14 -check_filesystem_type
15 +check_{bootargs,filesystem_type}
16
17 default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot"
18 [ -n "${clst_splash_theme}" ] && default_append_line="${default_append_line} splash=silent,theme:${clst_livecd_splash_theme} CONSOLE=/dev/tty1 quiet"
19 @@ -274,15 +273,13 @@ case ${clst_hostarch} in
20 echo "prompt 1" >> ${icfg}
21 echo "display boot.msg" >> ${icfg}
22 echo "F1 kernels.msg" >> ${icfg}
23 - echo "F2 F2.msg" >> ${icfg}
24 - echo "F3 F3.msg" >> ${icfg}
25 - echo "F4 F4.msg" >> ${icfg}
26 - echo "F5 F5.msg" >> ${icfg}
27 - echo "F6 F6.msg" >> ${icfg}
28 - echo "F7 F7.msg" >> ${icfg}
29 + for k in {2..7}
30 + do
31 + echo "F${k} F${k}.msg" >> ${icfg}
32 + done
33
34 echo "Available kernels:" > ${kmsg}
35 - for i in 2 3 4 5 6 7
36 + for i in {2..7}
37 do
38 cp ${clst_sharedir}/livecd/files/x86-F$i.msg \
39 $1/isolinux/F$i.msg
40 @@ -303,7 +300,6 @@ case ${clst_hostarch} in
41 echo "label ${x}-${y}" >> ${icfg}
42 echo " kernel ${x}" >> ${icfg}
43 echo " append ${default_append_line} softlevel=${y} initrd=${x}.igz vga=791" >> ${icfg}
44 -
45 echo >> ${icfg}
46 echo " ${x}" >> ${kmsg}
47 echo "label ${x}-${y}-nofb" >> ${icfg}
48 @@ -475,11 +471,9 @@ case ${clst_hostarch} in
49 # Next, figure out what kernels were specified in the
50 # spec file, and generate the appropriate arcload conf
51 # blocks specific to each system
52 - ip22="$(echo ${clst_boot_kernel} | tr " " "\n" | grep "ip22" | tr "\n" " ")"
53 - ip27="$(echo ${clst_boot_kernel} | tr " " "\n" | grep "ip27" | tr "\n" " ")"
54 - ip28="$(echo ${clst_boot_kernel} | tr " " "\n" | grep "ip28" | tr "\n" " ")"
55 - ip30="$(echo ${clst_boot_kernel} | tr " " "\n" | grep "ip30" | tr "\n" " ")"
56 - ip32="$(echo ${clst_boot_kernel} | tr " " "\n" | grep "ip32" | tr "\n" " ")"
57 + for l in 22 27 28 30 32; do
58 + ip${l}="$(echo ${clst_boot_kernel} | tr " " "\n" | grep "ip${l}" | tr "\n" " ")"
59 + done
60
61 if [ -n "${ip22}" ]; then
62 echo -e "${ip22base}" >> ${scratch}/arc.cf
63 --
64 2.10.2