|
3 | 3 |
|
4 | 4 | ISODIR="$1" |
5 | 5 |
|
6 | | -## remove existing repo sig |
7 | | -#rm -fv "$ISODIR/repodata/repomd.xml.asc" |
8 | | - |
9 | | -## remove old repo metadata |
10 | | -#rm -r "$ISODIR/repodata/" |
11 | | - |
| 6 | +# patches to kernel commandline |
| 7 | +SED_COMMANDS=() |
| 8 | +# harmless no-op substitution in case no other is added |
| 9 | +SED_COMMANDS+=(-e "s@^@@") |
12 | 10 |
|
13 | | -## example: customize theme |
14 | | -## remove old rpms |
15 | | -#for p in $(cat <<EOF |
16 | | -# xcp-ng-plymouth-theme-1.0.0-7.xcpng8.3.noarch.rpm |
17 | | -# xcp-ng-release-8.3.0-2.x86_64.rpm |
18 | | -# xcp-ng-release-config-8.3.0-2.x86_64.rpm |
19 | | -# xcp-ng-release-presets-8.3.0-2.x86_64.rpm |
20 | | -# xsconsole-10.1.13-1.xcpng8.3.x86_64.rpm |
21 | | -#EOF |
22 | | -# ) |
23 | | -#do |
24 | | -# rm "$ISODIR/Packages/$p" |
25 | | -#done |
26 | | -# |
27 | | -## add the new ones |
28 | | -#for p in $(cat <<EOF |
29 | | -# xcp-ng-plymouth-theme-1.0.0-7.xcpng8.3+newtheme1.noarch.rpm |
30 | | -# xcp-ng-release-8.3.0-2+newtheme1.x86_64.rpm |
31 | | -# xcp-ng-release-config-8.3.0-2+newtheme1.x86_64.rpm |
32 | | -# xcp-ng-release-presets-8.3.0-2+newtheme1.x86_64.rpm |
33 | | -# xsconsole-10.1.13-1.xcpng8.3+newtheme2.x86_64.rpm |
34 | | -#EOF |
35 | | -# ) |
36 | | -#do |
37 | | -# cp "$HOME/newtheme/$p" "$ISODIR/Packages/" |
38 | | -#done |
39 | | -# |
40 | | -## installer splash |
41 | | -#cp "$HOME/src/xcp/iso/8.3/boot/isolinux/splash.lss" "$ISODIR/boot/isolinux/" |
| 11 | +# # update some RPMs: |
| 12 | +# # * remove old repo metadata |
| 13 | +# rm -r "$ISODIR/repodata/" |
| 14 | +# # * replace RPMs |
| 15 | +# cp -p ~/my/Packages/*.rpm "$ISODIR/Packages/" |
| 16 | +# # * regenerate repo metadata |
| 17 | +# createrepo_c "$ISODIR" |
| 18 | +# # * add `no-repo-gpgcheck` so a modified repo will be accepted |
| 19 | +# SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz no-repo-gpgcheck@") |
42 | 20 |
|
| 21 | +# # prevent any reboot on installer error to allow investigating |
| 22 | +# SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz atexit=shell@") |
43 | 23 |
|
44 | | -## regenerate repodata |
45 | | -#createrepo_c "$ISODIR" |
| 24 | +# # activate ssh to installer with given password, eg. to collect logs |
| 25 | +# SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz network_device=all sshpassword=passw0rd@") |
46 | 26 |
|
47 | | -## patches to kernel commandline |
48 | | -SED_COMMANDS=() |
49 | | -# harmless no-op substitution in case no other is added |
50 | | -SED_COMMANDS+=(-e "s@^@@") |
| 27 | +# # get an answerfile over the network |
| 28 | +# SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz install answerfile=http://pxe/configs/preset.xml@") |
51 | 29 |
|
52 | | -# add `no-repo-gpgcheck` so a modified repo will be accepted |
53 | | -#SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz no-repo-gpgcheck@") |
54 | | -#SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz network_device=lacp:members=eth0,eth1@") |
55 | | -#SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz install answerfile=http://pxe/configs/custom/ydi/lacp.xml@") |
56 | | -#SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz atexit=shell@") |
| 30 | +# # get an answerfile from the ISO's install.img (also needs to copy preset.xml in patch-installimg.sh) |
| 31 | +# SED_COMMANDS+=(-e "s@/vmlinuz@/vmlinuz install answerfile=file:///preset.xml@") |
57 | 32 |
|
58 | 33 | sed -i "${SED_COMMANDS[@]}" \ |
59 | 34 | "$ISODIR"/*/*/grub*.cfg \ |
60 | 35 | "$ISODIR"/boot/isolinux/isolinux.cfg |
61 | 36 |
|
62 | | -## sign with a different key |
63 | | -#gpg1 --armor --detach-sign "$ISODIR/repodata/repomd.xml" |
64 | | -#gpg1 --armor --export > "$ISODIR/RPM-GPG-KEY-xcpng" |
| 37 | +# # sign with a different key (needs more work) |
| 38 | +# gpg1 --armor --detach-sign "$ISODIR/repodata/repomd.xml" |
| 39 | +# gpg1 --armor --export > "$ISODIR/RPM-GPG-KEY-xcpng" |
0 commit comments