diff --git a/resources/provision.sh b/resources/provision.sh index 1b90b2f..80c86e7 100755 --- a/resources/provision.sh +++ b/resources/provision.sh @@ -92,8 +92,17 @@ upstream_pkg_site_available() { } bootstrap_pkg() { + if [ -e /dev/iso9660 ]; then + local device_path=/dev/iso9660 + elif [ -e /dev/cd0 ]; then + local device_path=/dev/cd0 + else + echo "ERROR: There is no DVD/CDROM device available to mount" >&2 + exit 1 + fi + sed -i '' 's/signature_type: "fingerprints"/signature_type: "none"/' /etc/pkg/FreeBSD.conf - mount -t cd9660 /dev/cd0 /mnt + mount -t cd9660 "$device_path" /mnt export PACKAGESITE="file:///mnt/packages/FreeBSD:$ABI_VERSION:$PKG_SITE_ARCHITECTURE" ASSUME_ALWAYS_YES=yes pkg bootstrap }