aboutsummaryrefslogtreecommitdiff
path: root/scripts/os/freebsd/40-pkg
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-07-12 15:20:54 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-07-12 15:20:54 -0400
commit241833b7f320e7fca84ba226f1ecbb0c963534f7 (patch)
treeee9839af8bee6ec9c5cac08306e3167634babcec /scripts/os/freebsd/40-pkg
parent8ec6df0afeb4ef69fa64de5516d16f4be48e0549 (diff)
downloadinfrastructure-241833b7f320e7fca84ba226f1ecbb0c963534f7.tar.gz
initial commit of hypervisor configs
Diffstat (limited to 'scripts/os/freebsd/40-pkg')
-rw-r--r--scripts/os/freebsd/40-pkg29
1 files changed, 29 insertions, 0 deletions
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