Ran through ShellCheck.
This commit is contained in:
parent
7d652ae098
commit
0d104aa6af
|
@ -18,12 +18,12 @@ if [[ -z "$OUTDIR" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p ${OUTDIR}
|
mkdir -p "${OUTDIR}"
|
||||||
|
|
||||||
|
|
||||||
# Actually create the image. Our kickstart data should be in the same git repo as this script:
|
# Actually create the image. Our kickstart data should be in the same git repo as this script:
|
||||||
# (This takes a while, especially building on an rpi. Patience!)
|
# (This takes a while, especially building on an rpi. Patience!)
|
||||||
appliance-creator -v -c ./Rocky8_Rpi4.ks -n RockyRpi --version=20210626 --release=1 --vmem=2048 --vcpu=2 --no-compress -o ${OUTDIR}
|
appliance-creator -v -c ./Rocky8_Rpi4.ks -n RockyRpi --version=20210626 --release=1 --vmem=2048 --vcpu=2 --no-compress -o "${OUTDIR}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,12 +33,12 @@ appliance-creator -v -c ./Rocky8_Rpi4.ks -n RockyRpi --version=20210626 --relea
|
||||||
mkdir -p /mnt/tmp
|
mkdir -p /mnt/tmp
|
||||||
|
|
||||||
# find the image we just made, and make it available on /dev/maper/loop* devices:
|
# find the image we just made, and make it available on /dev/maper/loop* devices:
|
||||||
image=`find ${OUTDIR} -iname *.raw | head -1`
|
image=$(find "${OUTDIR}" -iname '*.raw' | head -1)
|
||||||
echo "Getting UUID and inserting to boot from ${image} ...."
|
echo "Getting UUID and inserting to boot from ${image} ...."
|
||||||
kpartx -av ${image}
|
kpartx -av "${image}"
|
||||||
|
|
||||||
# Get the UUID of our root partition (the ext4 one) (UUID=e3984938429 , strip out quotes("))
|
# Get the UUID of our root partition (the ext4 one) (UUID=e3984938429 , strip out quotes("))
|
||||||
partuuid=`blkid | grep "mapper/loop0p3" | head -1 | awk '{print $NF}' | tr -d '"' | tr '[:lower:]' '[:upper:]'`
|
partuuid=$(blkid | grep "mapper/loop0p3" | head -1 | awk '{print $NF}' | tr -d '"' | tr '[:lower:]' '[:upper:]')
|
||||||
|
|
||||||
# Mount the /boot partition:
|
# Mount the /boot partition:
|
||||||
mkdir -p /mnt/tmp
|
mkdir -p /mnt/tmp
|
||||||
|
@ -54,5 +54,4 @@ cat /mnt/tmp/cmdline.txt
|
||||||
|
|
||||||
# Finished, unmount and clean loopbacks:
|
# Finished, unmount and clean loopbacks:
|
||||||
umount /mnt/tmp
|
umount /mnt/tmp
|
||||||
kpartx -d ${image}
|
kpartx -d "${image}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue