This commit is contained in:
Bart Sjerps
2026-07-10 10:18:21 +02:00
parent c5ea471a5a
commit 052a88cd3b
2 changed files with 6 additions and 9 deletions
+3 -5
View File
@@ -7,7 +7,9 @@
die() { echo "$(basename $0): [die] $@" >&2 ; exit 1 ; }
test $(id -u) == 0 || die "Run as root (sudo $(basename $0) <opts>"
test $(id -u) == 0 || die "Run as root (sudo $(basename $0) <opts>"
rpm -q --quiet lorax || die "lorax not installed"
rpm -q --quiet genisoimage || die "genisoimage not installed"
# Setup temp working directory - clean it up when program ends
readonly WORKDIR=$(/bin/mktemp --tmpdir -d)
@@ -17,8 +19,6 @@ trap "cleanup" INT TERM HUP EXIT
topdir=$(git rev-parse --show-toplevel)
echo $topdir
# 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
@@ -28,8 +28,6 @@ custom=$topdir/custom
cp -r $custom $WORKDIR
cp $ks $WORKDIR
rpm -q --quiet lorax || die "lorax not installed"
rpm -q --quiet genisoimage || die "genisoimage not installed"
test -f $target && sudo rm -f $target