Deleted Added
full compact
startautoinstall.sh (220059) startautoinstall.sh (232880)
1#!/bin/sh
2#-
3# Copyright (c) 2010 iXsystems, Inc. All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
26# Script which reads the pc-autoinstall.conf directive, and begins the install
27#
1#!/bin/sh
2#-
3# Copyright (c) 2010 iXsystems, Inc. All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
26# Script which reads the pc-autoinstall.conf directive, and begins the install
27#
28# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh 220059 2011-03-27 16:57:54Z jpaetzel $
28# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/startautoinstall.sh 232880 2012-03-12 18:50:37Z jpaetzel $
29
30# Source our functions scripts
31. ${BACKEND}/functions.sh
32. ${BACKEND}/functions-networking.sh
33. ${BACKEND}/functions-parse.sh
34
35# Check that the config file exists
36if [ ! -e "${1}" ]

--- 72 unchanged lines hidden (view full) ---

109 echo "Type in 'install' to begin automated installation. Warning: Data on target disks may be destroyed!"
110 read tmp
111 case $tmp in
112 install|INSTALL) ;;
113 *) echo "Install canceled!" ; exit 150 ;;
114 esac
115 fi
116
29
30# Source our functions scripts
31. ${BACKEND}/functions.sh
32. ${BACKEND}/functions-networking.sh
33. ${BACKEND}/functions-parse.sh
34
35# Check that the config file exists
36if [ ! -e "${1}" ]

--- 72 unchanged lines hidden (view full) ---

109 echo "Type in 'install' to begin automated installation. Warning: Data on target disks may be destroyed!"
110 read tmp
111 case $tmp in
112 install|INSTALL) ;;
113 *) echo "Install canceled!" ; exit 150 ;;
114 esac
115 fi
116
117 ${PROGDIR}/pc-sysinstall -c ${INSTALL_CFG}
117 pc-sysinstall -c ${INSTALL_CFG}
118 if [ $? -eq 0 ]
119 then
120 if [ -n "$SHUTDOWN_CMD" ]
121 then
122 ${SHUTDOWN_CMD}
123 else
124 echo "SUCCESS: Installation finished! Press ENTER to reboot."
125 read tmp
126 shutdown -r now
127 fi
128 else
129 echo "ERROR: Installation failed, press ENTER to drop to shell."
130 read tmp
131 /bin/csh
132 fi
133else
134 echo "ERROR: Failed to get /tmp/pc-sysinstall.cfg for automated install..."
135 exit 150
136fi
118 if [ $? -eq 0 ]
119 then
120 if [ -n "$SHUTDOWN_CMD" ]
121 then
122 ${SHUTDOWN_CMD}
123 else
124 echo "SUCCESS: Installation finished! Press ENTER to reboot."
125 read tmp
126 shutdown -r now
127 fi
128 else
129 echo "ERROR: Installation failed, press ENTER to drop to shell."
130 read tmp
131 /bin/csh
132 fi
133else
134 echo "ERROR: Failed to get /tmp/pc-sysinstall.cfg for automated install..."
135 exit 150
136fi