From 241833b7f320e7fca84ba226f1ecbb0c963534f7 Mon Sep 17 00:00:00 2001 From: Cullum Smith Date: Fri, 12 Jul 2024 15:20:54 -0400 Subject: initial commit of hypervisor configs --- scripts/os/freebsd/40-pkg | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/os/freebsd/40-pkg (limited to 'scripts/os/freebsd/40-pkg') diff --git a/scripts/os/freebsd/40-pkg b/scripts/os/freebsd/40-pkg new file mode 100644 index 0000000..7c1c828 --- /dev/null +++ b/scripts/os/freebsd/40-pkg @@ -0,0 +1,29 @@ +#!/bin/sh + +case $BOXCONF_HOSTCLASS in + pkg_repository) + return # Do nothing. + ;; + freebsd_hypervisor) + ;; # Keep default FreeBSD pkg repository. + *) + # Configure on-prem pkg repository. + install_directory -m 0755 \ + /usr/local/etc/pkg \ + /usr/local/etc/pkg/repos + + install_file -m 0644 \ + /usr/local/etc/ssl/repo.crt \ + /usr/local/etc/pkg/repos/FreeBSD.conf + + install_template -m 0644 /usr/local/etc/pkg/repos/onprem.conf + ;; +esac + +# Update packages. +pkg update -f + +# Install default packages. +if [ -n "${install_packages:-}" ]; then + pkg install -y $install_packages +fi -- cgit v1.2.3