Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:redwil:15.4
kvm-client-container
label-install
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File label-install of Package kvm-client-container
#!/bin/bash set -euo pipefail # Check for read only root filesystem is_read_only() { [[ -n $(awk '$2 ~ /\/host$/ && $4 ~ /(^|,)ro($|,)/' /host/proc/mounts) ]] } INSTALL_PATH=$(is_read_only && echo "/host/usr/local/bin" || echo "/host/usr/bin") link_bin() { BIN=$1 # Temporary PATH that `command -v` will use local PATH=/host/usr/bin:/host/usr/local/bin # Don't replace already installed binaries with symlinks command -v ${BIN} || ln -srv ${INSTALL_PATH}/kvm-client-wrapper ${INSTALL_PATH}/${BIN} } virt_bins=() for package in libvirt-client libvirt-client-qemu python3-pvirsh python3-virt-scenario qemu-tools virt-install virt-top xorriso do virt_bins+=($(basename -a $(rpm -ql $package | grep "/usr/bin" | xargs))) done # Install container wrapper script. Installed binaries will be linked to this executable sed -e "s,%CONTAINER_IMAGE%,${IMAGE},g" /container/kvm-client-wrapper > ${INSTALL_PATH}/kvm-client-wrapper chmod 755 ${INSTALL_PATH}/kvm-client-wrapper for bin in "${virt_bins[@]}" do link_bin ${bin} done
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor