Files
Factory/ironic-ipa-ramdisk/root/usr/local/bin/suse-test-config-2.sh
Nicolas Belouin 4e3f1b61fd
All checks were successful
Build PR in OBS / Build PR in OBS (pull_request_target) Successful in 18s
Use up to date rootfs
Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
2025-05-13 11:13:24 +02:00

24 lines
656 B
Bash
Executable File

#!/bin/bash
set -eux
PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Transform the ID from the drive being considered to lower case
device_publisher_id=$(echo ${ID_FS_PUBLISHER_ID} | tr '[A-Z]' '[a-z]')
# Retrieve the publisher ID from the command line and convert to lower case
cmdline_publisher_id=""
if grep -q "ir_pub_id" /proc/cmdline; then
cmdline_publisher_id=$(cat /proc/cmdline | sed -e 's/^.*ir_pub_id=//' -e 's/ .*$//')
fi
# Is this the filesystem we are looking for?
if [[ "${cmdline_publisher_id}" == "${device_publisher_id}" ]]; then
# It is the device we are looking for, return success
exit 0
else
# Not a match, return failure
exit 1
fi