1 |
commit: 6ea0ef2013c2137f7f1f6f1a5f675f42d2a16d64 |
2 |
Author: Christos Kotsi <christo.kotsi <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Apr 12 08:43:47 2017 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 31 18:38:17 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6ea0ef20 |
7 |
|
8 |
targets: Simplify code with loops |
9 |
|
10 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
11 |
|
12 |
targets/support/bootloader-setup.sh | 12 +++++------- |
13 |
targets/support/livecdfs-update.sh | 7 +++---- |
14 |
2 files changed, 8 insertions(+), 11 deletions(-) |
15 |
|
16 |
diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh |
17 |
index 68e1355e..051adc28 100755 |
18 |
--- a/targets/support/bootloader-setup.sh |
19 |
+++ b/targets/support/bootloader-setup.sh |
20 |
@@ -191,15 +191,13 @@ case ${clst_hostarch} in |
21 |
echo "prompt 1" >> ${icfg} |
22 |
echo "display boot.msg" >> ${icfg} |
23 |
echo "F1 kernels.msg" >> ${icfg} |
24 |
- echo "F2 F2.msg" >> ${icfg} |
25 |
- echo "F3 F3.msg" >> ${icfg} |
26 |
- echo "F4 F4.msg" >> ${icfg} |
27 |
- echo "F5 F5.msg" >> ${icfg} |
28 |
- echo "F6 F6.msg" >> ${icfg} |
29 |
- echo "F7 F7.msg" >> ${icfg} |
30 |
+ for k in {2..7} |
31 |
+ do |
32 |
+ echo "F${k} F${k}.msg" >> ${icfg} |
33 |
+ done |
34 |
|
35 |
echo "Available kernels:" > ${kmsg} |
36 |
- for i in 2 3 4 5 6 7 |
37 |
+ for i in {2..7} |
38 |
do |
39 |
cp ${clst_sharedir}/livecd/files/x86-F$i.msg \ |
40 |
$1/isolinux/F$i.msg |
41 |
|
42 |
diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh |
43 |
index 0f39eab0..4156624c 100755 |
44 |
--- a/targets/support/livecdfs-update.sh |
45 |
+++ b/targets/support/livecdfs-update.sh |
46 |
@@ -68,10 +68,9 @@ fi |
47 |
|
48 |
# Setup links for ethernet devices |
49 |
cd /etc/init.d |
50 |
-ln -sf net.lo net.eth1 |
51 |
-ln -sf net.lo net.eth2 |
52 |
-ln -sf net.lo net.eth3 |
53 |
-ln -sf net.lo net.eth4 |
54 |
+for i in {1..4}; do |
55 |
+ ln -sf net.lo net.eth${i} |
56 |
+done |
57 |
|
58 |
# Add this for hwsetup/mkx86config |
59 |
mkdir -p /etc/sysconfig |