Allow overriding boot.ini.template
parent
cc45226e7d
commit
9708fc1744
|
@ -10,11 +10,13 @@ if [ -f "/mnt/$DISK_FILENAME" ]; then
|
||||||
[ -w "/mnt/$DISK_FILENAME" ] || { echo "Disk /mnt/$DISK_FILENAME exists and is not writable"; exit 1; }
|
[ -w "/mnt/$DISK_FILENAME" ] || { echo "Disk /mnt/$DISK_FILENAME exists and is not writable"; exit 1; }
|
||||||
echo "Disk found and is writable."
|
echo "Disk found and is writable."
|
||||||
else
|
else
|
||||||
[ -w "/mnt/" ] || { echo "Disk /mnt/$DISK_FILENAME not found and /mnt not writable"; exit 1; }
|
[ -w "/mnt/" ] || { echo "Disk /mnt/$DISK_FILENAME not found and /mnt not writable"; exit 1; }
|
||||||
[ -f "/rq0.dsk.gz" ] || { echo "Disk /mnt/$DISK_FILENAME not found and image was not built with a default disk"; exit 1; }
|
[ -f "/rq0.dsk.gz" ] ||
|
||||||
echo "Disk not found."
|
{ echo "Disk /mnt/$DISK_FILENAME not found and image was not built with a default disk"; exit 1; }
|
||||||
echo "Extracting default disk image..."
|
echo "Disk not found."
|
||||||
gzip -cd /rq0.dsk.gz > "/mnt/$DISK_FILENAME" || { echo "Failed to extract default disk image to /mnt/$DISK_FILENAME"; exit 1; }
|
echo "Extracting default disk image..."
|
||||||
|
gzip -cd /rq0.dsk.gz > "/mnt/$DISK_FILENAME" ||
|
||||||
|
{ echo "Failed to extract default disk image to /mnt/$DISK_FILENAME"; exit 1; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start CoreDNS as soon as possible after validations done
|
# Start CoreDNS as soon as possible after validations done
|
||||||
|
@ -26,6 +28,8 @@ coredns "$COREDNS_QUIET" -conf /Corefile &
|
||||||
[ -z "$NOEXIT" ] && EXIT_CMD="exit" || EXIT_CMD=""
|
[ -z "$NOEXIT" ] && EXIT_CMD="exit" || EXIT_CMD=""
|
||||||
|
|
||||||
echo "Configuring simh..."
|
echo "Configuring simh..."
|
||||||
|
# Allow overriding boot.ini.template
|
||||||
|
[ -f /mnt/boot.ini.template ] && cp -f /mnt/boot.ini.template /mnt/boot.ini.template
|
||||||
sed -e "s/<DISK_FILENAME>/${DISK_FILENAME}/" \
|
sed -e "s/<DISK_FILENAME>/${DISK_FILENAME}/" \
|
||||||
-e "s/<EXIT>/${EXIT_CMD}/" /boot.ini.template > /boot.ini
|
-e "s/<EXIT>/${EXIT_CMD}/" /boot.ini.template > /boot.ini
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue