5f5c63d1e2
* Changes of existing tools: - cpacfstats: Add support for FULL XTS (MSA 10) and HMAC (MSA 11) PAI counter - cpuplugd: Make cpuplugd compatible with hiperdispatch - dbginfo.sh: Add network sockstat info - pvapconfig: s390x exclusive build - zdev: Add option to select IPL device - zdump/dfo_s390: Support s390 DFO for vr-kernel dumps - zipl: Add support of mirror devices * Bug Fixes: - (genprotimg|zipl)/boot: discard .note.package ELF section to save memory - netboot/mk-s390image: Fix size when argument is a symlink - ziorep_config: Fix warning message when multipath device is not there. - zipl: Fix problems when target parameters are specified by user - zipl: Fix segfault when creating device-based dumps with '--dry-run' * Removed obsolete patches - s390-tools-2.34-Fix-Rust-compilation-errors.patch - s390-tools-01-zipl-src-add-basic-support-for-multiple-target-base-disks.patch - s390-tools-02-zipl-src-add-basic-support-for-multiple-target-base-disks.patch * Revendored vendor.tar.gz OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=226
93 lines
2.3 KiB
Bash
93 lines
2.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# Perform setup tasks based on what hypervisor is in charge.
|
|
#
|
|
|
|
# Source the sysconfig file
|
|
if [ -r /etc/sysconfig/virtsetup ]; then
|
|
. /etc/sysconfig/virtsetup
|
|
else echo "No /etc/sysconfig/virtsetup file was found."
|
|
exit 1
|
|
fi
|
|
|
|
#
|
|
# Get our hostname
|
|
#
|
|
my_hostname="$(hostname)"
|
|
|
|
#
|
|
# Find out the hypervisor we're running on/under.
|
|
#
|
|
hypervisor="$(/usr/bin/systemd-detect-virt)"
|
|
|
|
case "${hypervisor}" in
|
|
zvm)
|
|
if [ ! -c /dev/vmcp ]; then
|
|
modprobe vmcp
|
|
sleep 1
|
|
if [ ! -c /dev/vmcp ]; then
|
|
echo "Unable to load the vmcp kernel module."
|
|
exit 1
|
|
fi
|
|
fi
|
|
echo "The vmcp device driver is ready."
|
|
if [ "${ZVM_DETACH_DISKS}" == "yes" ]; then
|
|
echo "Detaching devices to prepare for Live Guest Relocation."
|
|
/usr/lib/systemd/scripts/detach_disks.sh
|
|
fi
|
|
if [ "${ZVM_WARN_ABOUT_POSSIBLE_LGR_PROBLEMS}" == yes ]; then
|
|
/sbin/lgr_check
|
|
fi
|
|
;;
|
|
none)
|
|
hypervisor="lpar"
|
|
if [ "${LPAR_SCLP_HOSTNAME}" == "yes" ]; then
|
|
# If the sclp_cpi module is already loaded, we have to unload it
|
|
# so we can be sure it has the correct system name specified
|
|
# when we reload it again.
|
|
if grep -qw sclp_cpi /proc/modules 2>/dev/null; then
|
|
rmmod sclp_cpi
|
|
sleep 1
|
|
fi
|
|
if grep -qw sclp_cpi /proc/modules 2>/dev/null; then
|
|
echo "Unable to unload the sclp_cpi kernel module."
|
|
exit 1
|
|
fi
|
|
echo "Setting the LPAR name via the sclp_cpi module."
|
|
modprobe sclp_cpi system_name="$my_hostname"
|
|
if ! grep -qw sclp_cpi /proc/modules 2>/dev/null; then
|
|
echo "We were unable to load the sclp_cpi module to set the LPAR name."
|
|
exit 2
|
|
fi
|
|
fi
|
|
;;
|
|
kvm)
|
|
;;
|
|
*)
|
|
echo "An unknown hypervisor, \"${hypervisor}\" was detected."
|
|
echo "Please report this to your support provider."
|
|
exit 3
|
|
;;
|
|
esac
|
|
|
|
#
|
|
# Now let's check for any scripts that other packages may have provided
|
|
# to do specific things they need. The scripts must be marked executable
|
|
# and have a suffix indicating which hypervisor for which they are to be run.
|
|
# Currently that is one of: kvm, lpar, or zvm.
|
|
# E.g., 01-test.script.zvm would only be run if the system is a z/VM guest.
|
|
#
|
|
|
|
for script in $(ls /lib/s390-tools/virtsetup/*.${hypervisor} 2>/dev/null)
|
|
do if [ -x "${script}" ]; then
|
|
echo "Executing ${script}..."
|
|
"${script}"
|
|
echo "Done."
|
|
echo
|
|
fi
|
|
done
|
|
|
|
exit 0
|