mirror of
https://github.com/truenas/scale-build.git
synced 2026-02-15 07:29:12 +00:00
Do not build initrd for the debug kernel by default (#822)
This commit is contained in:
@@ -175,7 +175,19 @@ def custom_rootfs_setup():
|
||||
with open(os.path.join(CHROOT_BASEDIR, 'etc/default/zfs'), 'a') as f:
|
||||
f.write('ZFS_INITRD_POST_MODPROBE_SLEEP=15')
|
||||
|
||||
run_in_chroot(['update-initramfs', '-k', 'all', '-u'])
|
||||
for initrd in os.listdir(f"{CHROOT_BASEDIR}/boot"):
|
||||
if initrd.startswith("initrd.img-") and "debug" in initrd:
|
||||
os.unlink(f"{CHROOT_BASEDIR}/boot/{initrd}")
|
||||
|
||||
for kernel in os.listdir(f"{CHROOT_BASEDIR}/boot"):
|
||||
if not kernel.startswith("vmlinuz-"):
|
||||
continue
|
||||
|
||||
kernel_name = kernel.removeprefix("vmlinuz-")
|
||||
if "debug" in kernel_name:
|
||||
continue
|
||||
|
||||
run_in_chroot(['update-initramfs', '-k', kernel_name, '-u'])
|
||||
|
||||
# Generate native systemd unit files for SysV services that lack ones to prevent systemd-sysv-generator warnings
|
||||
tmp_systemd = os.path.join(CHROOT_BASEDIR, 'tmp/systemd')
|
||||
|
||||
Reference in New Issue
Block a user