FreeBSD Bugzilla – Attachment 158526 Details for
Bug 201419
Add Autoinstall option to installer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Autoinstall patch
autoinstaller.patch (text/plain), 2.78 KB, created by
Matthew Martin
on 2015-07-08 06:29:33 UTC
(
hide
)
Description:
Autoinstall patch
Filename:
MIME Type:
Creator:
Matthew Martin
Created:
2015-07-08 06:29:33 UTC
Size:
2.78 KB
patch
obsolete
>Index: release/rc.local >=================================================================== >--- release/rc.local (revision 284494) >+++ release/rc.local (working copy) >@@ -53,25 +53,20 @@ > export TERM > > if [ -f /etc/installerconfig ]; then >- if bsdinstall script /etc/installerconfig; then >- dialog --backtitle "FreeBSD Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of FreeBSD complete! Rebooting in 10 seconds" 10 30 10 >- reboot >- else >- dialog --backtitle "FreeBSD Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0 >- fi >- exit >+ choice=$DIALOG_HELP # Select autoinstall >+else >+ dialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --help-button --help-label "Autoinstall" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0 >+ choice=$? > fi > >-dialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0 >+# If not netbooting, have the installer configure the network >+dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` >+if [ ${dlv:=0} -eq 0 -a ! -f /etc/diskless ]; then >+ BSDINSTALL_CONFIGCURRENT=yes; export BSDINSTALL_CONFIGCURRENT >+fi > >-case $? in >+case $choice in > $DIALOG_OK) # Install >- # If not netbooting, have the installer configure the network >- dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` >- if [ ${dlv:=0} -eq 0 -a ! -f /etc/diskless ]; then >- BSDINSTALL_CONFIGCURRENT=yes; export BSDINSTALL_CONFIGCURRENT >- fi >- > trap true SIGINT # Ignore cntrl-C here > bsdinstall > if [ $? -eq 0 ]; then >@@ -89,5 +84,29 @@ > /bin/sh > . /etc/rc.local > ;; >+$DIALOG_HELP) # Autoinstall >+ if [ -f /etc/installerconfig ]; then >+ installerconfig=/etc/installerconfig >+ else >+ installerconfig=/tmp/installerconfig >+ bsdinstall netconfig >+ for leasefile in /var/db/dhclient.leases.*; do >+ [ -e "$leasefile" ] || { dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox "No DHCP lease found" 0 0 && exit; } >+ configurl=$(sed -E '/^ *filename "(.*)";$/!d;s//\1/;q' $leasefile) && break >+ done >+ if ! ftp -Vo "$installerconfig" "$configurl"; then >+ dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox "URL '$configurl' could not be downloaded for autoinstall" 0 0 >+ exit >+ fi >+ >+ fi >+ if bsdinstall script "$installerconfig"; then >+ dialog --backtitle "FreeBSD Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of FreeBSD complete! Rebooting in 10 seconds" 10 30 10 >+ reboot >+ else >+ dialog --backtitle "FreeBSD Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0 >+ fi >+ exit >+ ;; > esac >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 201419
: 158526