Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP7:Update
ignition
ignition-setup-user.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ignition-setup-user.sh of Package ignition
#!/bin/bash set -euo pipefail copy_file_if_exists() { src="${1}"; dst="${2}" if [ -f "${src}" ]; then echo "Copying ${src} to ${dst}" cp "${src}" "${dst}" else echo "File ${src} does not exist.. Skipping copy" fi } destination=/usr/lib/ignition mkdir -p $destination if command -v is-live-image >/dev/null && is-live-image; then # Live image. If the user has supplied a config.ign via an appended # initrd, put it in the right place. copy_file_if_exists "/config.ign" "${destination}/user.ign" else # We will support a user embedded config in the boot partition # under $bootmnt/ignition/config.ign. Note that we mount /boot # but we don't unmount boot because we are run in a systemd unit # with MountFlags=slave so it is unmounted for us. bootmnt=/mnt/boot_partition mkdir -p $bootmnt if [ -e /dev/disk/by-label/ignition ]; then mount /dev/disk/by-label/ignition $bootmnt fi copy_file_if_exists "${bootmnt}/ignition/config.ign" "${destination}/user.ign" fi
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