Check-in [16098d6c6a]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix use of $@ to "$@" so that parameters with spaces are expanded/passed properly
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 16098d6c6a79a100081c2a0b428cf3a58bf630cc
User & Date: bdrewery 2013-06-02 11:51:35
Context
2013-06-02
14:13
Remove need of shared temporary file. check-in: 4dd80e9a9b user: antoine tags: trunk
11:51
Fix use of $@ to "$@" so that parameters with spaces are expanded/passed properly check-in: 16098d6c6a user: bdrewery tags: trunk
00:37
Jail all package untarring in case of bsdtar/libarchive vulns check-in: d0f0a4516e user: bdrewery tags: trunk
Changes

Changes to src/share/poudriere/common.sh.

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
}

my_name() {
	echo ${MASTERNAME}${MY_JOBID+-job-${MY_JOBID}}
}

injail() {
	jexec -U root ${MASTERNAME}${MY_JOBID+-job-${MY_JOBID}} $@
}

jstart() {
	local network="${localipargs}"
	[ $1 -eq 1 ] && network="${ipargs}"

	jail -c persist name=${MASTERNAME}${MY_JOBID+-job-${MY_JOBID}} \
................................................................................
	shift

	[ -f ${hookfile} ] &&
		URL_BASE="${URL_BASE}" \
		POUDRIERE_BUILD_TYPE=${POUDRIERE_BUILD_TYPE} \
		MASTERNAME="${MASTERNAME}" \
		BUILDNAME="${BUILDNAME}" \
		/bin/sh ${hookfile} $@
	return 0
}

log_start() {
	local log=$(log_path)
	local latest_log

................................................................................
	local name=$2
	local property=$3
	shift 3
	mkdir -p ${POUDRIERED}/${type}/${name}
	echo "$@" > ${POUDRIERED}/${type}/${name}/${property} || :
}

jset() { attr_set jails $@ ; }
pset() { attr_set ports $@ ; }

attr_get() {
	local type=$1
	local name=$2
	local property=$3
	cat ${POUDRIERED}/${type}/${name}/${property} || :
}

jget() { attr_get jails $@ ; }
pget() { attr_get ports $@ ; }

#build getter/setter
bget() {
	local id property mnt
	local log=$(log_path)
	if [ $# -eq 2 ]; then
		id=$1







|







 







|







 







|
|








|
|







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
}

my_name() {
	echo ${MASTERNAME}${MY_JOBID+-job-${MY_JOBID}}
}

injail() {
	jexec -U root ${MASTERNAME}${MY_JOBID+-job-${MY_JOBID}} "$@"
}

jstart() {
	local network="${localipargs}"
	[ $1 -eq 1 ] && network="${ipargs}"

	jail -c persist name=${MASTERNAME}${MY_JOBID+-job-${MY_JOBID}} \
................................................................................
	shift

	[ -f ${hookfile} ] &&
		URL_BASE="${URL_BASE}" \
		POUDRIERE_BUILD_TYPE=${POUDRIERE_BUILD_TYPE} \
		MASTERNAME="${MASTERNAME}" \
		BUILDNAME="${BUILDNAME}" \
		/bin/sh ${hookfile} "$@"
	return 0
}

log_start() {
	local log=$(log_path)
	local latest_log

................................................................................
	local name=$2
	local property=$3
	shift 3
	mkdir -p ${POUDRIERED}/${type}/${name}
	echo "$@" > ${POUDRIERED}/${type}/${name}/${property} || :
}

jset() { attr_set jails "$@" ; }
pset() { attr_set ports "$@" ; }

attr_get() {
	local type=$1
	local name=$2
	local property=$3
	cat ${POUDRIERED}/${type}/${name}/${property} || :
}

jget() { attr_get jails "$@" ; }
pget() { attr_get ports "$@" ; }

#build getter/setter
bget() {
	local id property mnt
	local log=$(log_path)
	if [ $# -eq 2 ]; then
		id=$1