forked from digabi/ytl-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmangle-image
More file actions
executable file
·25 lines (18 loc) · 860 Bytes
/
Copy pathmangle-image
File metadata and controls
executable file
·25 lines (18 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
set -euo pipefail
# This script will be called with an argument pointing to
# an unpacked directory of the ISO image to be modified, and is free to
# add, modify or delete files therein.
#
# The main repository checkout is in the current working directory.
WORKDIR="$1"
#########################################
# Step 2: UEFI boot mode / GRUB
#########################################
sed -i '/Install Ubuntu Server/iINCLUDE_YTL_MENU' "$WORKDIR"/boot/grub/grub.cfg
sed -i '/INCLUDE_YTL_MENU/r templates/ytl-grub.cfg' "$WORKDIR"/boot/grub/grub.cfg
sed -i '/INCLUDE_YTL_MENU/d' "$WORKDIR"/boot/grub/grub.cfg
sed -i "s|##AUTOINSTALL_URL##|$AUTOINSTALL_URL|" "$WORKDIR"/boot/grub/grub.cfg
# disable timeout to avoid installation loops and accidents
sed -i 's/timeout=[[:digit:]]\+/timeout=-1/' "$WORKDIR"/boot/grub/grub.cfg
# All done!