Deleted Added
full compact
functions-parse.sh (234985) functions-parse.sh (247705)
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-parse.sh 234985 2012-05-03 21:15:47Z jpaetzel $
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-parse.sh 247705 2013-03-03 09:47:47Z jpaetzel $
27
28# functions.sh
29# Library of functions which pc-sysinstall may call upon for parsing the config
30
31# which gets the value of a setting in the provided line
32get_value_from_string()
33{
34 if [ -n "${1}" ]

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

40 fi
41};
42
43# Get the value from the cfg file including spaces
44get_value_from_cfg_with_spaces()
45{
46 if [ -n "${1}" ]
47 then
27
28# functions.sh
29# Library of functions which pc-sysinstall may call upon for parsing the config
30
31# which gets the value of a setting in the provided line
32get_value_from_string()
33{
34 if [ -n "${1}" ]

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

40 fi
41};
42
43# Get the value from the cfg file including spaces
44get_value_from_cfg_with_spaces()
45{
46 if [ -n "${1}" ]
47 then
48 export VAL=`grep "^${1}=" ${CFGF} | head -n 1 | cut -d '=' -f 2-`
48 export VAL="`grep ^${1}= ${CFGF} | head -n 1 | cut -d '=' -f 2-`"
49 else
50 exit_err "Error: Did we forgot to supply a setting to grab?"
51 fi
52};
53
54
55# Get the value from the cfg file
56get_value_from_cfg()

--- 173 unchanged lines hidden ---
49 else
50 exit_err "Error: Did we forgot to supply a setting to grab?"
51 fi
52};
53
54
55# Get the value from the cfg file
56get_value_from_cfg()

--- 173 unchanged lines hidden ---