Skip to content

Commit 68d60eb

Browse files
committed
Honor APP_ROOT when installing locally built vminit image.
1 parent adb3c44 commit 68d60eb

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ release: all
7777

7878
.PHONY: init-block
7979
init-block:
80-
@scripts/install-init.sh
80+
scripts/install-init.sh $(SYSTEM_START_OPTS)
8181

8282
.PHONY: install
8383
install: installer-pkg

scripts/install-init.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
# Args for this script are used as the options for "container system start"
17+
1618
SWIFT="/usr/bin/swift"
1719
IMAGE_NAME="vminit:latest"
18-
DEST_DIR="${1:-$(git rev-parse --show-toplevel)/bin}"
19-
mkdir -p "${DEST_DIR}"
2020

2121
CONTAINERIZATION_VERSION="$(${SWIFT} package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .version')"
2222
if [ "${CONTAINERIZATION_VERSION}" == "unspecified" ] ; then
@@ -28,8 +28,9 @@ if [ "${CONTAINERIZATION_VERSION}" == "unspecified" ] ; then
2828
echo "Creating InitImage"
2929
make -C ${CONTAINERIZATION_PATH} init
3030
${CONTAINERIZATION_PATH}/bin/cctl images save -o /tmp/init.tar ${IMAGE_NAME}
31+
3132
# Sleep because commands after stop and start are racy.
32-
bin/container system stop && sleep 3 && bin/container system start && sleep 3
33+
bin/container system stop && sleep 3 && bin/container system start "$@" && sleep 3
3334
bin/container i load -i /tmp/init.tar
3435
rm /tmp/init.tar
3536
fi

0 commit comments

Comments
 (0)