Skip to content

Commit

Permalink
Merge pull request #73 from loopholelabs/oci-instance-config
Browse files Browse the repository at this point in the history
oci: add config for systemd unit file path
  • Loading branch information
pojntfx authored Jan 16, 2025
2 parents 5d74338 + 80eb6a2 commit e15164c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions os/package/oci-runtime-bundle/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ config BR2_PACKAGE_OCI_RUNTIME_BUNDLE_CONTAINER_NAME
help
Name to give to the container started by crun

config BR2_PACKAGE_OCI_RUNTIME_BUNDLE_SYSTEMD_INSTALL_DIR
string "oci-runtime-bundle-systemd-install-dir"
default "/usr/lib/systemd/system"
help
Directory to place the systemd unit file for the OCI runtime bundle service

endif
4 changes: 2 additions & 2 deletions os/package/oci-runtime-bundle/oci-runtime-bundle.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ define OCI_RUNTIME_BUNDLE_INSTALL_TARGET_CMDS
endef

define OCI_RUNTIME_BUNDLE_INSTALL_INIT_SYSTEMD
mkdir -p $(TARGET_DIR)/usr/lib/systemd/system
mkdir -p $(TARGET_DIR)$(BR2_PACKAGE_OCI_RUNTIME_BUNDLE_SYSTEMD_INSTALL_DIR)
sed -e "s%@OCI_RUNTIME_BUNDLE_MOUNT_DIR@%$(BR2_PACKAGE_OCI_RUNTIME_BUNDLE_MOUNT_DIR)%g" \
-e "s%@OCI_RUNTIME_BUNDLE_MOUNT_LABEL@%$(BR2_PACKAGE_OCI_RUNTIME_BUNDLE_MOUNT_LABEL)%g" \
-e "s%@OCI_RUNTIME_BUNDLE_CONTAINER_NAME@%$(BR2_PACKAGE_OCI_RUNTIME_BUNDLE_CONTAINER_NAME)%g" \
$(OCI_RUNTIME_BUNDLE_PKGDIR)/oci-runtime-bundle.service.in \
> $(TARGET_DIR)/usr/lib/systemd/system/oci-runtime-bundle.service
> $(TARGET_DIR)$(BR2_PACKAGE_OCI_RUNTIME_BUNDLE_SYSTEMD_INSTALL_DIR)/oci-runtime-bundle.service
endef

$(eval $(generic-package))

0 comments on commit e15164c

Please sign in to comment.