Page MenuHomeFreeBSD

D38838.diff
No OneTemporary

D38838.diff

diff --git a/etc/bsdinstall.example b/etc/bsdinstall.example
new file mode 100644
--- /dev/null
+++ b/etc/bsdinstall.example
@@ -0,0 +1,7 @@
+PARTITIONS=DEFAULT
+DISTRIBUTIONS="kernel.txz base.txz"
+
+#!/bin/sh
+sysrc ifconfig_DEFAULT=DHCP
+sysrc sshd_enable=YES
+pkg install puppet
\ No newline at end of file
diff --git a/release/Makefile b/release/Makefile
--- a/release/Makefile
+++ b/release/Makefile
@@ -189,7 +189,9 @@
echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf
echo loader_menu_multi_user_prompt=\"Installer\" >> ${.TARGET}/boot/loader.conf
cp ${.CURDIR}/rc.local ${.TARGET}/etc
-.if defined(NO_ROOT)
+ cp ${.CURDIR}/../etc/bsdinstall.example ${.TARGET}/etc
+ mkdir ${.TARGET}/config
+.if defined(NO_ROOT)
echo "./etc/resolv.conf type=link uname=root gname=wheel mode=0644 link=/tmp/bsdinstall_etc/resolv.conf" >> ${.TARGET}/METALOG
echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
echo "./etc/sysctl.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG
diff --git a/release/amd64/make-memstick.sh b/release/amd64/make-memstick.sh
--- a/release/amd64/make-memstick.sh
+++ b/release/amd64/make-memstick.sh
@@ -44,6 +44,7 @@
fi
echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab
+echo '/dev/msdosfs/CONFIG /config msdosfs ro,noatime 0 0' > ${BASEBITSDIR}/etc/fstab
echo 'root_rw_mount="NO"' > ${BASEBITSDIR}/etc/rc.conf.local
if [ -n "${METALOG}" ]; then
metalogfilename=$(mktemp /tmp/metalog.XXXXXX)
@@ -63,12 +64,21 @@
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
make_esp_file ${espfilename} ${fat32min} ${BASEBITSDIR}/boot/loader.efi
+# Make configuration directory
+cfgdirname=$(mktemp -d /tmp/config.XXXXX)
+cp ${BASEBITSDIR}/etc/bsdinstall.example ${cfgdirname}
+makefs -D -B little -t msdos -o fat_type=16 -o volume_label=CONFIG -o create_size=16m ${2}.config ${cfgdirname}
+
+rm -r ${cfgdirname}
+
mkimg -s mbr \
-b ${BASEBITSDIR}/boot/mbr \
-p efi:=${espfilename} \
-p freebsd:-"mkimg -s bsd -b ${BASEBITSDIR}/boot/boot -p freebsd-ufs:=${2}.part" \
+ -p fat16b:=${2}.config\
-a 2 \
-o ${2}
rm ${espfilename}
rm ${2}.part
+rm ${2}.config
diff --git a/usr.sbin/bsdinstall/startbsdinstall b/usr.sbin/bsdinstall/startbsdinstall
--- a/usr.sbin/bsdinstall/startbsdinstall
+++ b/usr.sbin/bsdinstall/startbsdinstall
@@ -44,6 +44,19 @@
# Query terminal size; useful for serial lines.
resizewin -z
+if [ -f /config/installerconfig ]; then
+ if [ "$1" != "primary" ]; then
+ bsddialog --backtitle "FreeBSD Installer" --title "Installing" --msgbox "FreeBSD is being installed from a script; please use the primary console." 0 0
+ . "$0"
+ elif bsdinstall script /config/installerconfig; then
+ bsddialog --backtitle "FreeBSD Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of FreeBSD complete! Rebooting in 10 seconds" 10 30 10
+ reboot
+ else
+ bsddialog --backtitle "FreeBSD Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0
+ fi
+ exit
+fi
+
if [ -f /etc/installerconfig ]; then
if [ "$1" != "primary" ]; then
bsddialog --backtitle "FreeBSD Installer" --title "Installing" --msgbox "FreeBSD is being installed from a script; please use the primary console." 0 0

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 10, 6:01 AM (1 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16572215
Default Alt Text
D38838.diff (3 KB)

Event Timeline