Skip to content

Commit 2a5a872

Browse files
Merge pull request #320 from BastilleBSD/fixes
more fixes
2 parents b0eb671 + 8a69853 commit 2a5a872

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

usr/local/bin/rocinante

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,19 @@ case "${CMD}" in
118118
help|-h|--help)
119119
usage
120120
;;
121-
bootstrap \
122-
cmd \
123-
cp \
124-
limits \
125-
list \
126-
pkg \
127-
service \
128-
sysctl \
129-
sysrc \
130-
template \
131-
update \
132-
upgrade \
133-
verify \
121+
bootstrap| \
122+
cmd| \
123+
cp| \
124+
limits| \
125+
list| \
126+
pkg| \
127+
service| \
128+
sysctl| \
129+
sysrc| \
130+
template| \
131+
update| \
132+
upgrade| \
133+
verify| \
134134
zfs)
135135
;;
136136
*)
@@ -152,4 +152,4 @@ if [ -f "${SCRIPTPATH}" ]; then
152152
fi
153153
else
154154
error_exit "${SCRIPTPATH} not found."
155-
fi
155+
fi

usr/local/libexec/rocinante/template.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ render() {
105105

106106
line_in_file() {
107107

108-
local file_path="${1}"
109-
local line="${2}"
108+
local line="${1%% *}"
109+
local file_path="${1#* }"
110110

111111
if [ -f "${file_path}" ]; then
112112
if ! grep -qxF "${line}" "${file_path}"; then
@@ -245,7 +245,6 @@ echo "Applying template: ${TEMPLATE}..."
245245

246246
# Build a list of sed commands like this: -e 's/${username}/root/g' -e 's/${domain}/example.com/g'
247247
# Values provided by default (without being defined by the user) are listed here. -- cwells
248-
ARG_REPLACEMENTS="-e 's/\${JAIL_IP}/${_jail_ip}/g' -e 's/\${JAIL_NAME}/${_jail}/g'"
249248
# This is parsed outside the HOOKS loop so an ARG file can be used with a Bastillefile. -- cwells
250249
if [ -s "${rocinante_template}/ARG" ]; then
251250
while read _line; do

0 commit comments

Comments
 (0)