-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch_sdboot.py
More file actions
30 lines (18 loc) · 945 Bytes
/
patch_sdboot.py
File metadata and controls
30 lines (18 loc) · 945 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
26
27
28
29
30
import os
with open('archlive/efiboot/loader/entries/01-archiso-linux.conf', 'r') as fp:
sd_archiso = fp.read()
sd_archiso = sd_archiso.replace('Arch Linux', 'Project GDL')
sd_archiso = sd_archiso.replace('%ARCHISO_UUID%', '%ARCHISO_UUID% quiet splash')
with open('archlive/efiboot/loader/entries/01-archiso-linux.conf', 'w') as fp:
fp.write(sd_archiso)
with open('archlive/efiboot/loader/entries/02-archiso-speech-linux.conf', 'r') as fp:
sd2_archiso = fp.read()
sd2_archiso = sd2_archiso.replace('Arch Linux', 'Project GDL')
with open('archlive/efiboot/loader/entries/02-archiso-speech-linux.conf', 'w') as fp:
fp.write(sd2_archiso)
with open('archlive/efiboot/loader/loader.conf', 'r') as fp:
sd_loader = fp.read()
sd_loader = sd_loader.replace('timeout 15', 'timeout 0')
sd_loader = sd_loader.replace('beep on', 'beep off')
with open('archlive/efiboot/loader/loader.conf', 'w') as fp:
fp.write(sd_loader)