forked from pool/s390-tools
6a6c0cb679
*** v2.34.0 * Changes of existing tools: - ap_tools/ap-check: Add support for vfio-ap dynamic configuration - dbginfo.sh: Update/Add additional DASD data collection - dumpconf: Add new parameter 'SCP_DATA' for SCSI/NVMe/ECKD dump devices - libutil: Make formatted meta-data configurable - s390-tools: Replace 'which' with built-in 'command -v' - zdump/dfi_elf: Support core dumps of vr-kernels * Bug Fixes: - chzdev: Fix warning about failed ATTR writes by udev - rust/pv: Try again if first CRL-URI is invalid - rust/pvattest: Add short option for --arpk - zdump: Fix 'zgetdump -i' ioctl error on s390 formatted dump file *** v2.33.1 * Bug Fixes: - s390-tools: Fix formatting and typos in README.md - s390-tools: Fix release string *** v2.33.0 * Add new tools / libraries: - chpstat: New tool for displaying channel path statistics - libutil: Add output format helpers(util_fmt: JSON, JSON-SEQ, CSV, text pairs) * Changes of existing tools / libraries: - chzdev: Add --is-owner to identify files created by zdev - dasdfmt: Change default mode to always use full-format (Note: affects ESE DASD) - libap: Significantly reduce delay time between file lock retries - pvattest: Rewrite from C to Rust - pvattest: Support additional data & user-data - rust/pv: Support for Attestation * Bug Fixes: - chreipl: Improve disk type detection when running under QEMU - dbginfo.sh: Use POSIX option with uname - s390-tools: Fix missing hyphen escapes in the man page for many tools - zipl/src: Fix bugs in disk_get_info() reproducible in corner cases *** v2.32.0 * Changes of existing tools: - cpumf/lscpumf: add support for machine type 3932 - genprotimg, pvattest, and pvsecret accept IBM signing key with Armonk as subject locality - zdump/zipl: Support for List-Directed dump from ECKD DASD - zkey: Detect FIPS mode and generate PBKDF for luksFormat according to it * Bug Fixes: - dbginfo.sh: dash compatible copy sequence - rust/pv_core: Fix UvDeviceInfo::get() method - zipl/src: Fix leak of files if run with a broken configuration - zkey: Fix convert command to accept only keys of type CCA-AESDATA * Revendored vendor.tar.gz * Removed obsolete patches - s390-tools-sles15sp5-01-rust-pv-support-Armonk-in-IBM-signing-key-subject.patch - s390-tools-sles15sp6-02-genprotimg-support-Armonk-in-IBM-signing-key-subject.patch - s390-tools-sles15sp6-03-libpv-support-Armonk-in-IBM-signing-key-subject.patch - s390-tools-sles15sp6-04-pvattest-Fix-root-ca-parsing.patch - s390-tools-sles15sp6-genprotimg-makefile.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=219
182 lines
4.3 KiB
Bash
182 lines
4.3 KiB
Bash
#! /bin/sh
|
|
# Copyright (c) 2003 SUSE LINUX AG Nuernberg, Germany.
|
|
#
|
|
# Please send feedback to http://www.suse.de/feedback/
|
|
#
|
|
# /etc/init.d/hsnc
|
|
#
|
|
# and symbolic its link
|
|
#
|
|
# /usr/sbin/ip_watcher.pl
|
|
# /usr/sbin/xcec-bridge
|
|
# /usr/sbin/start_hsnc.sh
|
|
# /use/sbin/rchsnc
|
|
#
|
|
# System startup script for the HiperSockets Network Concentrator
|
|
#
|
|
# /etc/hsnc.conf should contain the following lines:
|
|
#
|
|
# operating_mode=[unicast|full|no]
|
|
# unicast means, only unicast forwarded between the hsint's and osaint's.
|
|
# this is the default mode
|
|
# full means, unicast, multicast and broadcast are forwarded, if supported
|
|
# by the hardware
|
|
#
|
|
# hsi_int="<interface> [<interface> [...]]"
|
|
# described all the HiperSockets interfaces involved in the HSN
|
|
#
|
|
# osa_int="<interface>"
|
|
# describes the OSA interface connecting to other LANs
|
|
#
|
|
|
|
|
|
START_HSNC_BIN=/usr/sbin/start_hsnc.sh
|
|
IP_WATCHER_BIN=/usr/sbin/ip_watcher.pl
|
|
XCEC_BRIDGE_BIN=/usr/sbin/xcec-bridge
|
|
|
|
HSNC_CONFIG_FILE=/etc/sysconfig/hsnc
|
|
HSNC_CLEANUP_FILE=/var/run/hsnc.cleanup
|
|
|
|
test -x $START_HSNC_BIN || exit 5
|
|
test -x $IP_WATCHER_BIN || exit 5
|
|
test -x $XCEC_BRIDGE_BIN || exit 5
|
|
|
|
# Return values acc. to LSB for all commands but status:
|
|
# 0 - success
|
|
# 1 - generic or unspecified error
|
|
# 2 - invalid or excess argument(s)
|
|
# 3 - unimplemented feature (e.g. "reload")
|
|
# 4 - insufficient privilege
|
|
# 5 - program is not installed
|
|
# 6 - program is not configured
|
|
# 7 - program is not running
|
|
#
|
|
# Note that starting an already running service, stopping
|
|
# or restarting a not-running service as well as the restart
|
|
# with force-reload (in case signalling is not supported) are
|
|
# considered a success.
|
|
|
|
#call with cleanup or not
|
|
read_config_file() {
|
|
if [ "$1" == "cleanup" ]; then
|
|
file=$HSNC_CLEANUP_FILE
|
|
else
|
|
file=$HSNC_CONFIG_FILE
|
|
fi
|
|
|
|
if [ -s $file ]; then
|
|
source $file
|
|
else
|
|
echo -ne "\nCannot read $file: empty or nonexistant! "
|
|
# Means not configured:
|
|
exit 3
|
|
fi
|
|
}
|
|
|
|
#call with cleanup or not
|
|
set_osa_mode() {
|
|
# for full mode, we set up the osa as multicast router. otherwise, no
|
|
# special setup is required for the osa.
|
|
if [ "$operating_mode" == "full" ]; then
|
|
if [ "$1" == "cleanup" ]; then
|
|
echo no_router > /sys/class/net/$osa_int/device/route4
|
|
else
|
|
echo multicast_router > /sys/class/net/$osa_int/device/route4
|
|
fi
|
|
fi
|
|
}
|
|
|
|
#call with cleanup or not
|
|
set_hsi_mode() {
|
|
# set all the involved HiperSockets interfaces as primary_connector. For
|
|
# special HA setups, some more tweaking is needed, but then a handcarved
|
|
# solution should be used anyway.
|
|
for i in $hsi_int ; do
|
|
if [ "$1" == "cleanup" ]; then
|
|
echo no_router > /sys/class/net/$i/device/route4
|
|
else
|
|
echo primary_connector > /sys/class/net/$i/device/route4
|
|
fi
|
|
done
|
|
}
|
|
|
|
do_start_hsnc() {
|
|
set_osa_mode
|
|
set_hsi_mode
|
|
if [ "$operating_mode" == "full" ]; then
|
|
$IP_WATCHER_BIN --check
|
|
else
|
|
$IP_WATCHER_BIN --check $osa_int
|
|
fi
|
|
CODE=$?
|
|
if [ $CODE != 0 ]; then
|
|
return $CODE
|
|
else
|
|
cp $HSNC_CONFIG_FILE $HSNC_CLEANUP_FILE
|
|
#
|
|
# To match the LSB spec, startproc returns 0,
|
|
# even if the program it already running.
|
|
#
|
|
if [ "$operating_mode" == "full" ]; then
|
|
startproc $START_HSNC_BIN
|
|
else
|
|
startproc $START_HSNC_BIN $osa_int
|
|
fi
|
|
return $?
|
|
fi
|
|
}
|
|
|
|
service="HiperSockets Network concentrator"
|
|
case "$1" in
|
|
start)
|
|
if checkproc $START_HSNC_BIN; then
|
|
# Starting an already running service is success:
|
|
echo -n "(already running)"
|
|
else
|
|
if read_config_file; then
|
|
do_start_hsnc
|
|
RETVAL=$?
|
|
exit $RETVAL
|
|
fi
|
|
fi
|
|
|
|
;;
|
|
stop)
|
|
echo -n "Shutting down $service "
|
|
|
|
# kill ip_watcher, start_hsnc, which started it needs cleans up
|
|
# then:
|
|
killproc -TERM $IP_WATCHER_BIN
|
|
if [ -f $HSNC_CLEANUP_FILE ]; then
|
|
read_config_file cleanup
|
|
# remove all connector settings(not yet implemented):
|
|
set_osa_mode cleanup
|
|
set_hsi_mode cleanup
|
|
|
|
# remove the file in /var/run
|
|
rm -f $HSNC_CLEANUP_FILE
|
|
else
|
|
echo -n "- no cleanup file found "
|
|
fi
|
|
|
|
;;
|
|
status)
|
|
echo -n "Checking $service "
|
|
## Check status with checkproc(8), if process is running
|
|
## checkproc will return with exit status 0.
|
|
|
|
# Status has a slightly different for the status command:
|
|
# 0 - service running
|
|
# 1 - service dead, but /var/run/ pid file exists
|
|
# 2 - service dead, but /var/lock/ lock file exists
|
|
# 3 - service not running
|
|
|
|
# NOTE: checkproc returns LSB compliant status values.
|
|
checkproc $START_HSNC_BIN
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
|