diff --git a/package/harvester-os/files/usr/sbin/harv-install b/package/harvester-os/files/usr/sbin/harv-install index 99ae4cbaf..4455d8605 100755 --- a/package/harvester-os/files/usr/sbin/harv-install +++ b/package/harvester-os/files/usr/sbin/harv-install @@ -119,7 +119,10 @@ get_url() check_iso(){ if [ -n "$HARVESTER_ISO_URL" ]; then - echo "Checking ISO URL.." + if [ "$HARVESTER_ISO_URL" = "local" ]; then + return + fi + echo "Checking ISO URL..." check_url "$HARVESTER_ISO_URL" fi } @@ -127,11 +130,16 @@ check_iso(){ get_iso() { if [ -n "$HARVESTER_ISO_URL" ]; then - echo "Downloading ISO.." ISOMNT=$(mktemp -d -p /tmp cos.XXXXXXXX.isomnt) - ISOTEMP=$(mktemp -p ${TARGET}/usr/local cos.XXXXXXXX.iso) - get_url ${HARVESTER_ISO_URL} ${ISOTEMP} - ISO_DEVICE=$(losetup --show -f $ISOTEMP) + if [ "$HARVESTER_ISO_URL" = "local" ]; then + echo "Using local ISO..." + ISO_DEVICE="/dev/sr0" + else + echo "Downloading ISO..." + ISOTEMP=$(mktemp -p ${TARGET}/usr/local cos.XXXXXXXX.iso) + get_url ${HARVESTER_ISO_URL} ${ISOTEMP} + ISO_DEVICE=$(losetup --show -f $ISOTEMP) + fi mount -o ro ${ISO_DEVICE} ${ISOMNT} fi }