19 lines
515 B
Bash
Executable File
19 lines
515 B
Bash
Executable File
#!/bin/bash
|
|
|
|
die() { echo "$(basename $0): [die] $@" >&2 ; exit 1 ; }
|
|
|
|
# requires lorax, genisoimage: dnf install lorax genisoimage
|
|
|
|
isopath=/nfs/sw/os/rocky/Rocky-9.7-x86_64-minimal.iso
|
|
target=/nfs/pve/template/iso/custom.iso
|
|
ks=/users/bart/git/rocky/kickstart/rocky-9.cfg
|
|
custom=/users/bart/git/rocky/custom
|
|
|
|
rpm -q --quiet lorax || die "lorax not installed"
|
|
rpm -q --quiet genisoimage || die "genisoimage not installed"
|
|
|
|
test -f $target && rm -f $target
|
|
|
|
sudo mkksiso -a $custom --ks=$ks $isopath $target
|
|
|