Deleted Added
full compact
functions-installcomponents.sh (222078) functions-installcomponents.sh (240165)
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

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

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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#
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

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

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh 222078 2011-05-18 20:29:07Z jpaetzel $
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh 240165 2012-09-06 14:59:53Z jpaetzel $
27
28# Functions which check and load any optional modules specified in the config
29
30. ${BACKEND}/functions.sh
31. ${BACKEND}/functions-parse.sh
32
33copy_component()
34{

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

66 then
67 exit_err "ERROR: Install medium was set to ftp, but no ftpPath was provided!"
68 fi
69 FTPPATH="${VAL}"
70
71 fetch_file "${FTPPATH}/${COMPFILEDIR}/${SUBDIR}/${CFILE}" "${FSMNT}/${COMPTMPDIR}/${CFILE}" "0"
72 RESULT="$?"
73 ;;
27
28# Functions which check and load any optional modules specified in the config
29
30. ${BACKEND}/functions.sh
31. ${BACKEND}/functions-parse.sh
32
33copy_component()
34{

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

66 then
67 exit_err "ERROR: Install medium was set to ftp, but no ftpPath was provided!"
68 fi
69 FTPPATH="${VAL}"
70
71 fetch_file "${FTPPATH}/${COMPFILEDIR}/${SUBDIR}/${CFILE}" "${FSMNT}/${COMPTMPDIR}/${CFILE}" "0"
72 RESULT="$?"
73 ;;
74
75 sftp) ;;
74 local)
75 get_value_from_cfg localPath
76 if [ -z "$VAL" ]; then
77 exit_err "Install medium was set to local, but no localPath was provided!"
78 fi
79 LOCALPATH=$VAL
80 cp ${LOCALPATH}/${COMPFILEDIR}/${SUBDIR}/${CFILE} \
81 ${FSMNT}/${COMPTMPDIR} >>${LOGOUT} 2>>${LOGOUT}
82 RESULT="$?"
83 ;;
76 esac
77
78 if [ "${RESULT}" != "0" ]
79 then
80 echo_log "WARNING: Failed to copy ${CFILE}"
81 FAILED="1"
82 else
83 # Now lets check the MD5 to confirm the file is valid

--- 86 unchanged lines hidden ---
84 esac
85
86 if [ "${RESULT}" != "0" ]
87 then
88 echo_log "WARNING: Failed to copy ${CFILE}"
89 FAILED="1"
90 else
91 # Now lets check the MD5 to confirm the file is valid

--- 86 unchanged lines hidden ---