Compare commits
149 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
93479b677f | ||
|
882b26e468 | ||
|
0226a1b211 | ||
|
3eddb1a036 | ||
|
ad9e1ad7a0 | ||
|
0f03699129 | ||
|
f00ff2ac55 | ||
|
2c0b6d2ea2 | ||
|
8a3c26800a | ||
|
ca71fe340e | ||
|
7a5c89e84a | ||
|
40db3a57ae | ||
|
70bd1af9bd | ||
|
51cd104ddd | ||
|
5184801f0e | ||
|
535cc10766 | ||
|
3b4ba770c1 | ||
|
702b044c20 | ||
|
3fa397e687 | ||
|
9e549c2e6c | ||
|
087a10568c | ||
|
262d603726 | ||
|
4b655c64f1 | ||
|
d81d4fd383 | ||
|
da9838c800 | ||
|
b43bfd7eed | ||
|
a6e30a308a | ||
|
57b37fee1f | ||
|
d6f3723e10 | ||
|
9e98b44d8b | ||
|
607a6825f4 | ||
|
685ce32c07 | ||
|
77693cd7eb | ||
|
c33643ba10 | ||
|
bef2b35dc9 | ||
|
af41c81d1b | ||
|
473c14c9ab | ||
|
a7424a8ff0 | ||
|
6f524eab5a | ||
|
ca6b193ac3 | ||
|
cc536faf67 | ||
|
f7710610d8 | ||
|
1c93647293 | ||
|
a2cb8e5beb | ||
|
6dc91fa6ea | ||
|
ad7942bd0c | ||
|
a483890884 | ||
|
78ef6e86e5 | ||
|
b385215ded | ||
|
c69c48c992 | ||
|
ea8f5ea852 | ||
|
083020797b | ||
|
a8e761756e | ||
|
287377b414 | ||
|
c1e8b3a309 | ||
|
0419550a2a | ||
|
9e8e130a7c | ||
|
2a913049ee | ||
|
ce7722eab4 | ||
|
e4da637a53 | ||
|
b2e74b0a3e | ||
|
2bf7d95c95 | ||
|
02409651fa | ||
|
3d1d949272 | ||
|
d792b32be1 | ||
|
7a34f7d689 | ||
|
6ce1f4d14f | ||
|
1409803b15 | ||
|
a823de10da | ||
|
ab939b3c36 | ||
|
0450181b8e | ||
|
4a5ecf837b | ||
|
1cc3998852 | ||
|
2ff6f78332 | ||
|
1b35631849 | ||
|
2f9ebbc0ab | ||
|
83bfc0e7d7 | ||
|
cf1344b04d | ||
|
a895d0c8be | ||
|
a9bf2dafeb | ||
|
1f19dda30e | ||
|
6f6a4deece | ||
|
b8f75bde3c | ||
|
f9a139cce4 | ||
|
383f5e27aa | ||
|
0aa4b528e1 | ||
|
365ca29316 | ||
|
e477a92045 | ||
|
6b21143baa | ||
|
5e82789fe7 | ||
|
1ec03967cb | ||
|
974303a2f3 | ||
|
58aa25016f | ||
|
78962171af | ||
|
6e980e4fa1 | ||
|
920a9af392 | ||
|
4295214706 | ||
|
3e57fc3074 | ||
|
594bda140c | ||
|
e0e6dde32f | ||
|
b3e6ad36b4 | ||
|
2cd85a32d2 | ||
|
87ca1f4032 | ||
|
cb145202ea | ||
|
0379a19cd4 | ||
|
18c25ca8a6 | ||
|
b42105540f | ||
|
a8004b6c5b | ||
|
4f95e67dc9 | ||
|
5229fe4f01 | ||
|
81aaf37c09 | ||
|
61130fa91d | ||
|
1a182b31d3 | ||
|
b1b957aaf0 | ||
|
bd0e3fb9c2 | ||
|
6fa2feaf5b | ||
|
378300fbc7 | ||
|
234b2c55c3 | ||
|
848b61ef39 | ||
|
b45c50cd89 | ||
|
f39b11e184 | ||
|
51e189a385 | ||
|
95b85f6150 | ||
|
a8e0a7dfa6 | ||
|
b0eb99190c | ||
|
01b858f02d | ||
|
2ff30e744f | ||
|
c301cb59af | ||
|
2f4b67cd1e | ||
|
a8d596d27b | ||
|
8473d5923b | ||
|
80686e380e | ||
|
7ffae6dc71 | ||
|
4b248d8445 | ||
|
e9f0a67862 | ||
|
36ad014995 | ||
|
877da844b3 | ||
|
f25abae336 | ||
|
4238dfb8b8 | ||
|
8a861db4e5 | ||
|
dbc645a2c4 | ||
|
6aab78b451 | ||
|
fe78d02b5f | ||
|
464c5cfccf | ||
|
7b458c246c | ||
|
00a29e6617 | ||
|
6e58e0e033 | ||
|
732529cc93 | ||
|
2136cc04f3 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,5 +5,5 @@ src_vipa-2.0.4.tar.gz
|
||||
/lib-zfcp-hbaapi-2.1.tar.gz
|
||||
/src_vipa-2.1.0.tar.gz
|
||||
/s390-tools-*.tar.bz2
|
||||
/s390-tools-2.0.0.tar.gz
|
||||
/s390-tools-2.1.0.tar.gz
|
||||
/s390-tools-*.tar.gz
|
||||
/s390-tools-*-rust-vendor.tar.xz
|
||||
|
183
20-zipl-kernel.install
Executable file
183
20-zipl-kernel.install
Executable file
@ -0,0 +1,183 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[[ -f /etc/sysconfig/kernel ]] && . /etc/sysconfig/kernel
|
||||
|
||||
COMMAND="$1"
|
||||
KERNEL_VERSION="$2"
|
||||
BOOT_DIR_ABS="$3"
|
||||
KERNEL_IMAGE="$4"
|
||||
|
||||
KERNEL_DIR="${KERNEL_IMAGE%/*}"
|
||||
|
||||
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
|
||||
|
||||
BLS_DIR="/boot/loader/entries"
|
||||
ZIPLCFG="/etc/zipl.conf"
|
||||
CMDLINE_LINUX_DEBUG=" systemd.log_level=debug systemd.log_target=kmsg"
|
||||
LINUX_DEBUG_VERSION_POSTFIX="_with_debugging"
|
||||
LINUX_DEBUG_TITLE_POSTFIX=" with debugging"
|
||||
|
||||
mkbls() {
|
||||
local kernelver=$1 && shift
|
||||
local datetime=$1 && shift
|
||||
local kernelopts=$1 && shift
|
||||
|
||||
local debugname=""
|
||||
local flavor=""
|
||||
|
||||
if [[ "$kernelver" == *\+* ]] ; then
|
||||
local flavor=-"${kernelver##*+}"
|
||||
if [[ "${flavor}" == "-debug" ]]; then
|
||||
local debugname=" with debugging"
|
||||
local debugid="-debug"
|
||||
fi
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
title ${NAME} (${kernelver}) ${VERSION}${debugname}
|
||||
version ${kernelver}${debugid}
|
||||
linux /boot/vmlinuz-${kernelver}
|
||||
initrd /boot/initramfs-${kernelver}.img
|
||||
options ${kernelopts}
|
||||
id ${ID}-${datetime}-${kernelver}${debugid}
|
||||
grub_users \$grub_users
|
||||
grub_arg --unrestricted
|
||||
grub_class kernel${flavor}
|
||||
EOF
|
||||
}
|
||||
|
||||
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
|
||||
case "$COMMAND" in
|
||||
add)
|
||||
if [[ "${KERNEL_DIR}" != "/boot" ]]; then
|
||||
# rename to match the name used in the pseudo-BLS snippet above
|
||||
cp --remove-destination --preserve=timestamps -T "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}"
|
||||
command -v restorecon &>/dev/null && \
|
||||
restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}"
|
||||
|
||||
for i in \
|
||||
"$KERNEL_DIR"/System.map \
|
||||
"$KERNEL_DIR"/config \
|
||||
"$KERNEL_DIR"/zImage.stub
|
||||
do
|
||||
[[ -e "$i" ]] || continue
|
||||
cp --preserve=timestamps -T "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
|
||||
command -v restorecon &>/dev/null && \
|
||||
restorecon -R "/boot/${i##*/}-${KERNEL_VERSION}"
|
||||
done
|
||||
# hmac is .vmlinuz-<version>.hmac so needs a special treatment
|
||||
i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac"
|
||||
if [[ -e "$i" ]]; then
|
||||
cp --preserve=timestamps "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
|
||||
command -v restorecon &>/dev/null && \
|
||||
restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then
|
||||
declare -a BOOT_OPTIONS
|
||||
if [[ -f /etc/kernel/cmdline ]]; then
|
||||
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
|
||||
fi
|
||||
|
||||
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
||||
read -r -d '' -a line < /proc/cmdline
|
||||
for i in "${line[@]}"; do
|
||||
[[ "${i#initrd=*}" != "$i" || "${i#BOOT_IMAGE=*}" != "$i" ]] && continue
|
||||
BOOT_OPTIONS+=("$i")
|
||||
done
|
||||
fi
|
||||
|
||||
[[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR"
|
||||
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf"
|
||||
if [[ -f "${KERNEL_DIR}/bls.conf" ]]; then
|
||||
cp --preserve=timestamps -T "${KERNEL_DIR}/bls.conf" "${BLS_TARGET}" || exit $?
|
||||
sed -i -e "s,^linux.*,linux /boot/vmlinuz-${KERNEL_VERSION},g" "${BLS_TARGET}"
|
||||
sed -i -e "s,^initrd.*,initrd /boot/initramfs-${KERNEL_VERSION}.img,g" "${BLS_TARGET}"
|
||||
sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}#g" "${BLS_TARGET}"
|
||||
else
|
||||
mkbls "${KERNEL_VERSION}" \
|
||||
"$(date -u +%Y%m%d%H%M%S -d "$(stat -c '%y' "${KERNEL_DIR}")")" \
|
||||
"${BOOT_OPTIONS[*]}" >"${BLS_TARGET}"
|
||||
fi
|
||||
|
||||
if [[ "$KERNEL_VERSION" == *\+* ]] && [ "x$DEFAULTDEBUG" != "xyes" ]; then
|
||||
UPDATEDEFAULT="no"
|
||||
fi
|
||||
|
||||
if [[ "x$UPDATEDEFAULT" = "xyes" ]]; then
|
||||
TITLE="$(grep '^title[ \t]' "${BLS_TARGET}" | sed -e 's/^title[ \t]*//')"
|
||||
NEWDEFAULT="${TITLE}"
|
||||
fi
|
||||
|
||||
if [ "x${MAKEDEBUG}" = "xyes" ]; then
|
||||
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")"
|
||||
cp --preserve=timestamps -T "${BLS_TARGET}" "${BLS_DEBUG}"
|
||||
TITLE="$(grep '^title[ \t]' "${BLS_DEBUG}" | sed -e 's/^title[ \t]*//')"
|
||||
VERSION="$(grep '^version[ \t]' "${BLS_DEBUG}" | sed -e 's/^version[ \t]*//')"
|
||||
BLSID="$(grep '^id[ \t]' "${BLS_DEBUG}" | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")"
|
||||
sed -i -e "s/^title.*/title ${TITLE}${LINUX_DEBUG_TITLE_POSTFIX}/" "${BLS_DEBUG}"
|
||||
sed -i -e "s/^version.*/version ${VERSION}${LINUX_DEBUG_VERSION_POSTFIX}/" "${BLS_DEBUG}"
|
||||
sed -i -e "s/^id.*/${BLSID}/" "${BLS_DEBUG}"
|
||||
sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}${CMDLINE_LINUX_DEBUG}#" "${BLS_DEBUG}"
|
||||
if [ -n "$NEWDEFAULT" -a "x$DEFAULTDEBUG" = "xyes" ]; then
|
||||
TITLE="$(grep '^title[ \t]' "${BLS_DEBUG}" | sed -e 's/^title[ \t]*//')"
|
||||
NEWDEFAULT="${TITLE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$NEWDEFAULT" ] && [ -f "${ZIPLCFG}" ]; then
|
||||
if grep -q "^default=" "${ZIPLCFG}"; then
|
||||
sed -i -e "s,^default=.*,default=${NEWDEFAULT}," "${ZIPLCFG}"
|
||||
else
|
||||
echo "default=${NEWDEFAULT}" >> "${ZIPLCFG}"
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
|
||||
# If grubby is used there's no need to run other installation plugins
|
||||
exit 77
|
||||
;;
|
||||
remove)
|
||||
if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then
|
||||
ARCH="$(uname -m)"
|
||||
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf"
|
||||
BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")"
|
||||
|
||||
if [ -f "${BLS_TARGET}" ] && [ -f "${ZIPLCFG}" ]; then
|
||||
TITLE="$(grep '^title[ \t]' "${BLS_TARGET}" | sed -e 's/^title[ \t]*//')"
|
||||
sed -i -e "/^default=${TITLE}/d" "${ZIPLCFG}"
|
||||
fi
|
||||
|
||||
if [[ -f "${BLS_DEBUG}" ]]; then
|
||||
TITLE="$(grep '^title[ \t]' "${BLS_DEBUG}" | sed -e 's/^title[ \t]*//')"
|
||||
sed -i -e "/^default=${TITLE}/d" "${ZIPLCFG}"
|
||||
fi
|
||||
|
||||
rm -f "${BLS_TARGET}" "${BLS_DEBUG}"
|
||||
|
||||
for i in vmlinuz System.map config zImage.stub dtb; do
|
||||
rm -rf "/boot/${i}-${KERNEL_VERSION}"
|
||||
done
|
||||
# hmac is .vmlinuz-<version>.hmac so needs a special treatment
|
||||
rm -f "/boot/.vmlinuz-${KERNEL_VERSION}.hmac"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
/sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $?
|
||||
# If grubby is used there's no need to run other installation plugins
|
||||
exit 77
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
42
52-zipl-rescue.install
Executable file
42
52-zipl-rescue.install
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
[[ -f /etc/os-release ]] && . /etc/os-release
|
||||
[[ -f /etc/sysconfig/kernel ]] && . /etc/sysconfig/kernel
|
||||
|
||||
COMMAND="$1"
|
||||
KERNEL_VERSION="$2"
|
||||
BOOT_DIR_ABS="$3"
|
||||
KERNEL_IMAGE="$4"
|
||||
|
||||
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
|
||||
|
||||
BLS_DIR="/boot/loader/entries"
|
||||
|
||||
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
|
||||
case "$COMMAND" in
|
||||
add)
|
||||
if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then
|
||||
declare -a BOOT_OPTIONS
|
||||
if [[ -f /etc/kernel/cmdline ]]; then
|
||||
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
|
||||
fi
|
||||
|
||||
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
||||
read -r -d '' -a line < /proc/cmdline
|
||||
for i in "${line[@]}"; do
|
||||
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||
BOOT_OPTIONS+=("$i")
|
||||
done
|
||||
fi
|
||||
|
||||
BLS_RESCUE="${BLS_DIR}/${MACHINE_ID}-0-rescue.conf"
|
||||
if [[ -f "${BLS_RESCUE}" ]] && grep -q '^options.*$kernelopts' "${BLS_RESCUE}"; then
|
||||
sed -i -e "s,^linux.*,linux /boot/vmlinuz-0-rescue-${MACHINE_ID},g" "${BLS_RESCUE}"
|
||||
sed -i -e "s,^initrd.*,initrd /boot/initramfs-0-rescue-${MACHINE_ID}.img,g" "${BLS_RESCUE}"
|
||||
sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}#g" "${BLS_RESCUE}"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
15
91-zipl.install
Executable file
15
91-zipl.install
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -f /etc/zipl.conf ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
COMMAND="$1"
|
||||
|
||||
case "$COMMAND" in
|
||||
add|remove)
|
||||
zipl > /dev/null
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
13
ccw.udev
13
ccw.udev
@ -1,13 +1,4 @@
|
||||
ACTION!="add|change", GOTO="ccw_end"
|
||||
ACTION!="add|bind|change", GOTO="ccw_end"
|
||||
SUBSYSTEM!="ccw", GOTO="ccw_end"
|
||||
ATTRS{cutype}=="1731/01", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="1731/02", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="1731/05", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="1731/06", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="3088/01", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="3088/08", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="3088/60", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="3088/61", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="3088/1e", RUN+="ccw_init"
|
||||
ATTRS{cutype}=="3088/1f", RUN+="ccw_init"
|
||||
DRIVER=="ctcm|lcs|qeth", RUN+="ccw_init"
|
||||
LABEL="ccw_end"
|
||||
|
30
ccw_init
30
ccw_init
@ -24,6 +24,25 @@ get_config_line_by_subchannel()
|
||||
return 1
|
||||
}
|
||||
|
||||
# borrowed from network-scrips, initscripts along with the get_config_by_subchannel
|
||||
[ -z "$__sed_discard_ignored_files" ] && __sed_discard_ignored_files='/\(~\|\.bak\|\.old\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
|
||||
|
||||
get_config_by_subchannel ()
|
||||
{
|
||||
LANG=C grep -E -i -l \
|
||||
"^[[:space:]]*SUBCHANNELS=['\"]?([0-9]\.[0-9]\.[a-f0-9]+,){0,2}${1}(,[0-9]\.[0-9]\.[a-f0-9]+){0,2}['\"]?([[:space:]]+#|[[:space:]]*$)" \
|
||||
/etc/sysconfig/network-scripts/ifcfg-* \
|
||||
| LC_ALL=C sed -e "$__sed_discard_ignored_files"
|
||||
}
|
||||
|
||||
get_config_by_subchannel_nm ()
|
||||
{
|
||||
LANG=C grep -E -i -l \
|
||||
"^s390-subchannels=([0-9]\.[0-9]\.[a-f0-9]+;){0,2}${1};([0-9]\.[0-9]\.[a-f0-9]+;){0,2}$" \
|
||||
/etc/NetworkManager/system-connections/*.nmconnection \
|
||||
| LC_ALL=C sed -e "$__sed_discard_ignored_files"
|
||||
}
|
||||
|
||||
CHANNEL=${DEVPATH##*/}
|
||||
|
||||
if [ $MODE = "dracut" ]; then
|
||||
@ -49,14 +68,19 @@ if [ $MODE = "dracut" ]; then
|
||||
elif [ $MODE = "normal" ]; then
|
||||
NOLOCALE="yes"
|
||||
|
||||
. /etc/sysconfig/network-scripts/network-functions
|
||||
|
||||
CONFIG_FILE=$(get_config_by_subchannel $CHANNEL)
|
||||
|
||||
if [ -n "$CONFIG_FILE" ]; then
|
||||
. $CONFIG_FILE
|
||||
else
|
||||
exit 1
|
||||
CONFIG_FILE=$(get_config_by_subchannel_nm $CHANNEL)
|
||||
if [ -n "$CONFIG_FILE" ]; then
|
||||
NETTYPE=$(sed -nr "/^\[ethernet\]/ { :l /^s390-nettype[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE)
|
||||
SUBCHANNELS=$(sed -nr "/^\[ethernet\]/ { :l /^s390-subchannels[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE | sed -e "s/;/,/g" -e "s/,$//")
|
||||
LAYER2=$(sed -nr "/^\[ethernet-s390-options\]/ { :l /^layer2[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" $CONFIG_FILE)
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Unknown mode=$MODE"
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -urN cmsfs-1.1.8/cmsfssed.sh cmsfs-1.1.8_/cmsfssed.sh
|
||||
--- cmsfs-1.1.8/cmsfssed.sh 2003-02-28 17:52:59.000000000 -0500
|
||||
+++ cmsfs-1.1.8_/cmsfssed.sh 2004-05-28 16:36:22.000000000 -0400
|
||||
@@ -85,7 +85,7 @@
|
||||
DRIVER_SOURCE="cmsfs22x.c"
|
||||
MODULES_DIRECTORY="/lib/modules/`uname -r`/fs"
|
||||
;;
|
||||
- 2.4*|2.5*)
|
||||
+ 2.4*|2.5*|2.6*|3.*|4.*)
|
||||
LINUX_RELEASE="2.4"
|
||||
# ln -s cmsfs24x.c cmsfsvfs.c
|
||||
INCLUDES="-I/lib/modules/`uname -r`/build/include"
|
@ -1,31 +0,0 @@
|
||||
From 25442f958a12b428b7d063b927ac48965dcd8164 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||
Date: Fri, 28 Jan 2011 16:11:19 +0100
|
||||
Subject: [PATCH] use detected filesystem block size on FBA devices
|
||||
|
||||
If a FBA device is not properly formated, then the CMS file system can
|
||||
have a different block size. The cmsfs tools were able to detect the file
|
||||
system block size, but in fact they still used default 512 instead. And
|
||||
using the default was causing crashes. Now the detected value is used.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=651012
|
||||
---
|
||||
cmsfsany.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/cmsfsany.c b/cmsfsany.c
|
||||
index 55bcfdc..18efffb 100644
|
||||
--- a/cmsfsany.c
|
||||
+++ b/cmsfsany.c
|
||||
@@ -102,7 +102,7 @@ int cmsfs_find_label(struct CMSSUPER *vol,struct CMSFSADT *adt)
|
||||
cmsfs_error(cmsfs_ermsg);
|
||||
}
|
||||
vol->flags = CMSFSFBA;
|
||||
- vol->blksz = 512;
|
||||
+ vol->blksz = blksz;
|
||||
return vol->blksz;
|
||||
} }
|
||||
|
||||
--
|
||||
1.7.3.5
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- cmsfs-1.1.8/cmsfsvol.c.warnings 2003-07-18 01:38:57.000000000 +0200
|
||||
+++ cmsfs-1.1.8/cmsfsvol.c 2005-09-06 16:57:15.000000000 +0200
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/* print a header; looks like CMS */
|
||||
(void) printf("LABEL VDEV M STAT CYL TYPE \
|
||||
-BLKSZ FILES BLKS USED-(%) BLKS LEFT BLK TOTAL\n");
|
||||
+BLKSZ FILES BLKS USED-(%%) BLKS LEFT BLK TOTAL\n");
|
||||
|
||||
for ( ; i < argc ; i++)
|
||||
{
|
@ -306,6 +306,14 @@ if [ $MODE_ZNET ]; then
|
||||
eval "$line"
|
||||
free_device $SUBCHANNELS
|
||||
done
|
||||
for line in $(LANG=C grep -E -i -h \
|
||||
"^s390-subchannels=([0-9]\.[0-9]\.[a-f0-9]+;){2,3}$" \
|
||||
$( (ls /etc/NetworkManager/system-connections/*.nmconnection 2> /dev/null || echo "__no_config_file") | \
|
||||
LC_ALL=C sed -e "$__sed_discard_ignored_files") 2> /dev/null)
|
||||
do
|
||||
SUBCHANNELS="$(echo $line | sed -e "s/s390-subchannels=//" -e "s/;/,/g")"
|
||||
free_device $SUBCHANNELS
|
||||
done
|
||||
fi
|
||||
|
||||
[ -z "$ALL_DEVICES" ] && exit 0
|
||||
|
@ -1,10 +1,12 @@
|
||||
[Unit]
|
||||
Description=Free all devices on startup
|
||||
DefaultDependencies=no
|
||||
Before=sysinit.target
|
||||
Before=sysinit.target systemd-udev-trigger.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/sbin/device_cio_free
|
||||
StandardOutput=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
|
8
rpminspect.yaml
Normal file
8
rpminspect.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
pathmigration:
|
||||
excluded_paths:
|
||||
- /lib/s390-tools
|
||||
|
||||
badfuncs:
|
||||
ignore:
|
||||
- /usr/sbin/qethqoat
|
348
s390-tools-zipl-blscfg-rpm-nvr-sort.patch
Normal file
348
s390-tools-zipl-blscfg-rpm-nvr-sort.patch
Normal file
@ -0,0 +1,348 @@
|
||||
From b2daaa34776ba6afec879e362378f6f7563590a6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||||
Date: Mon, 20 Jun 2022 17:43:05 +0200
|
||||
Subject: [PATCH 1/2] Revert "zipl/src: Implement sorting bls entries by
|
||||
versions"
|
||||
|
||||
This reverts commit a0dba6bfdb50ff373fa710ffe2a307cc0748f18b.
|
||||
---
|
||||
zipl/src/scan.c | 139 ++----------------------------------------------
|
||||
1 file changed, 3 insertions(+), 136 deletions(-)
|
||||
|
||||
diff --git a/zipl/src/scan.c b/zipl/src/scan.c
|
||||
index 0cea1d4..9352f76 100644
|
||||
--- a/zipl/src/scan.c
|
||||
+++ b/zipl/src/scan.c
|
||||
@@ -10,7 +10,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-static const char *VERSION_KEYWORD = "version";
|
||||
|
||||
/* Need ISOC99 function isblank() in ctype.h */
|
||||
#ifndef __USE_ISOC99
|
||||
@@ -646,7 +645,7 @@ scan_file(const char* filename, struct scan_token** token)
|
||||
|
||||
|
||||
static int
|
||||
-bls_filter_by_names(const struct dirent *ent)
|
||||
+bls_filter(const struct dirent *ent)
|
||||
{
|
||||
int offset = strlen(ent->d_name) - strlen(".conf");
|
||||
|
||||
@@ -656,111 +655,13 @@ bls_filter_by_names(const struct dirent *ent)
|
||||
return strncmp(ent->d_name + offset, ".conf", strlen(".conf")) == 0;
|
||||
}
|
||||
|
||||
-struct version {
|
||||
- char *line; /* pointer to a line with version keyword */
|
||||
- int offset; /* offset of version value in the line */
|
||||
-};
|
||||
-
|
||||
-/*
|
||||
- * Locate version in bls file represented by ENT
|
||||
- */
|
||||
-static void get_version(const struct dirent *ent, struct version *v)
|
||||
-{
|
||||
- char *line = NULL;
|
||||
- size_t len = 0;
|
||||
- char *d_name;
|
||||
- FILE *stream;
|
||||
- ssize_t read;
|
||||
-
|
||||
- memset(v, 0, sizeof(*v));
|
||||
- d_name = misc_make_path((char *)blsdir, (char *)ent->d_name);
|
||||
- if (!d_name)
|
||||
- return;
|
||||
-
|
||||
- stream = fopen(d_name, "r");
|
||||
- free(d_name);
|
||||
- if (!stream)
|
||||
- return;
|
||||
-
|
||||
- while ((read = getline(&line, &len, stream)) != -1) {
|
||||
- if (line[read - 1] == '\n') {
|
||||
- line[read - 1] = '\0';
|
||||
- read--;
|
||||
- }
|
||||
- if ((size_t)read <= strlen(VERSION_KEYWORD) + 1)
|
||||
- continue;
|
||||
- if (strcmp(VERSION_KEYWORD, line) > 0)
|
||||
- continue;
|
||||
- if (!isblank(line[strlen(VERSION_KEYWORD)]))
|
||||
- continue;
|
||||
- /* skip blanks */
|
||||
- v->offset = strlen(VERSION_KEYWORD) + 1;
|
||||
- while (v->offset < read - 1 && isblank(line[v->offset]))
|
||||
- v->offset++;
|
||||
- if (isblank(line[v->offset]))
|
||||
- /*
|
||||
- * all characters after the keyword
|
||||
- * are blanks. Invalid version
|
||||
- */
|
||||
- continue;
|
||||
- v->line = line;
|
||||
- fclose(stream);
|
||||
- return;
|
||||
- }
|
||||
- free(line);
|
||||
- fclose(stream);
|
||||
-}
|
||||
-
|
||||
-static void put_version(struct version *v)
|
||||
-{
|
||||
- free(v->line);
|
||||
-}
|
||||
-
|
||||
-/**
|
||||
- * Check version in bls file represented by ENT.
|
||||
- * Return 1 if version is valid. Otherwise return 0
|
||||
- */
|
||||
-static int bls_filter_by_versions(const struct dirent *ent)
|
||||
-{
|
||||
- struct version v;
|
||||
-
|
||||
- if (bls_filter_by_names(ent) == 0)
|
||||
- return 0;
|
||||
-
|
||||
- get_version(ent, &v);
|
||||
- if (v.line) {
|
||||
- put_version(&v);
|
||||
- return 1;
|
||||
- }
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
|
||||
static int
|
||||
-bls_sort_by_names(const struct dirent **ent_a, const struct dirent **ent_b)
|
||||
+bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
|
||||
{
|
||||
return strverscmp((*ent_a)->d_name, (*ent_b)->d_name);
|
||||
}
|
||||
|
||||
-static int
|
||||
-bls_sort_by_versions(const struct dirent **ent_a, const struct dirent **ent_b)
|
||||
-{
|
||||
- struct version v1, v2;
|
||||
- int ret;
|
||||
-
|
||||
- get_version(*ent_a, &v1);
|
||||
- get_version(*ent_b, &v2);
|
||||
- /*
|
||||
- * Both versions are valid.
|
||||
- * It is guaranteed by bls_filter_by_versions()
|
||||
- */
|
||||
- ret = strverscmp(v1.line + v1.offset, v2.line + v2.offset);
|
||||
-
|
||||
- put_version(&v1);
|
||||
- put_version(&v2);
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
|
||||
static int
|
||||
scan_append_section_heading(struct scan_token* scan, int* index, char* name);
|
||||
@@ -1110,40 +1011,6 @@ scan_count_target_keywords(char* keyword[])
|
||||
return num;
|
||||
}
|
||||
|
||||
-static int bls_scandir(struct dirent ***bls_entries)
|
||||
-{
|
||||
- struct dirent **entries1;
|
||||
- struct dirent **entries2;
|
||||
- int n1, n2;
|
||||
-
|
||||
- /* arrange by names */
|
||||
- n1 = scandir(blsdir, &entries1,
|
||||
- bls_filter_by_names, bls_sort_by_names);
|
||||
- if (n1 <= 0)
|
||||
- return n1;
|
||||
- /* arrange by versions */
|
||||
- n2 = scandir(blsdir, &entries2,
|
||||
- bls_filter_by_versions, bls_sort_by_versions);
|
||||
-
|
||||
- if (n2 <= 0 || n2 < n1) {
|
||||
- /*
|
||||
- * failed to sort by versions,
|
||||
- * fall back to sorting by filenames
|
||||
- */
|
||||
- *bls_entries = entries1;
|
||||
- while (n2--)
|
||||
- free(entries2[n2]);
|
||||
- free(entries2);
|
||||
- return n1;
|
||||
- }
|
||||
- /* use arrangement by versions */
|
||||
- *bls_entries = entries2;
|
||||
- while (n1--)
|
||||
- free(entries1[n1]);
|
||||
- free(entries1);
|
||||
- return n2;
|
||||
-}
|
||||
-
|
||||
int
|
||||
scan_check_target_data(char* keyword[], int* line)
|
||||
{
|
||||
@@ -1464,7 +1331,7 @@ int scan_bls(struct scan_token **token, int scan_size)
|
||||
if (!(stat(blsdir, &sb) == 0 && S_ISDIR(sb.st_mode)))
|
||||
return 0;
|
||||
|
||||
- n = bls_scandir(&bls_entries);
|
||||
+ n = scandir(blsdir, &bls_entries, bls_filter, bls_sort);
|
||||
if (n <= 0)
|
||||
return n;
|
||||
|
||||
--
|
||||
2.39.2
|
||||
|
||||
|
||||
From 692e70bcfc32a05e30146bd7077c41e0eaceff03 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 20 Jun 2022 17:46:59 +0200
|
||||
Subject: [PATCH 2/2] blscfg: sort like rpm nvr, not like a single version
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Signed-off-by: Dan Horák <dan@danny.cz>
|
||||
---
|
||||
zipl/src/Makefile | 1 +
|
||||
zipl/src/scan.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 95 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/zipl/src/Makefile b/zipl/src/Makefile
|
||||
index cab5655..7ec215d 100644
|
||||
--- a/zipl/src/Makefile
|
||||
+++ b/zipl/src/Makefile
|
||||
@@ -9,6 +9,7 @@ ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS)
|
||||
|
||||
libs = $(rootdir)/libutil/libutil.a \
|
||||
$(rootdir)/libvtoc/libvtoc.a \
|
||||
+ -lrpmio -lrpm
|
||||
|
||||
objects = misc.o error.o scan.o job.o boot.o bootmap.o fs-map.o disk.o \
|
||||
bootmap_header.o envblk.o install.o zipl.o
|
||||
diff --git a/zipl/src/scan.c b/zipl/src/scan.c
|
||||
index 9352f76..3327e2d 100644
|
||||
--- a/zipl/src/scan.c
|
||||
+++ b/zipl/src/scan.c
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
#include "lib/util_base.h"
|
||||
|
||||
+#include <rpm/rpmlib.h>
|
||||
+
|
||||
#include "boot.h"
|
||||
#include "error.h"
|
||||
#include "misc.h"
|
||||
@@ -655,13 +657,103 @@ bls_filter(const struct dirent *ent)
|
||||
return strncmp(ent->d_name + offset, ".conf", strlen(".conf")) == 0;
|
||||
}
|
||||
|
||||
+/* returns name/version/release */
|
||||
+/* NULL string pointer returned if nothing found */
|
||||
+static void
|
||||
+split_package_string (char *package_string, char **name,
|
||||
+ char **version, char **release)
|
||||
+{
|
||||
+ char *package_version, *package_release;
|
||||
+
|
||||
+ /* Release */
|
||||
+ package_release = strrchr (package_string, '-');
|
||||
+
|
||||
+ if (package_release != NULL)
|
||||
+ *package_release++ = '\0';
|
||||
+
|
||||
+ *release = package_release;
|
||||
+
|
||||
+ /* Version */
|
||||
+ package_version = strrchr(package_string, '-');
|
||||
+
|
||||
+ if (package_version != NULL)
|
||||
+ *package_version++ = '\0';
|
||||
+
|
||||
+ *version = package_version;
|
||||
+ /* Name */
|
||||
+ *name = package_string;
|
||||
+
|
||||
+ /* Bubble up non-null values from release to name */
|
||||
+ if (name != NULL && *name == NULL) {
|
||||
+ *name = (*version == NULL ? *release : *version);
|
||||
+ *version = *release;
|
||||
+ *release = NULL;
|
||||
+ }
|
||||
+ if (*version == NULL) {
|
||||
+ *version = *release;
|
||||
+ *release = NULL;
|
||||
+ }
|
||||
+}
|
||||
|
||||
static int
|
||||
-bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
|
||||
+split_cmp(char *nvr0, char *nvr1, int has_name)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+ char *name0, *version0, *release0;
|
||||
+ char *name1, *version1, *release1;
|
||||
+
|
||||
+ split_package_string(nvr0, has_name ? &name0 : NULL, &version0, &release0);
|
||||
+ split_package_string(nvr1, has_name ? &name1 : NULL, &version1, &release1);
|
||||
+
|
||||
+ if (has_name) {
|
||||
+ ret = rpmvercmp(name0 == NULL ? "" : name0,
|
||||
+ name1 == NULL ? "" : name1);
|
||||
+ if (ret != 0)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = rpmvercmp(version0 == NULL ? "" : version0,
|
||||
+ version1 == NULL ? "" : version1);
|
||||
+ if (ret != 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = rpmvercmp(release0 == NULL ? "" : release0,
|
||||
+ release1 == NULL ? "" : release1);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/* return 1: filename0 is newer than filename1 */
|
||||
+/* 0: filename0 and filename1 are the same version */
|
||||
+/* -1: filename1 is newer than filename0 */
|
||||
+static int bls_cmp(const char *filename0, const char *filename1)
|
||||
{
|
||||
- return strverscmp((*ent_a)->d_name, (*ent_b)->d_name);
|
||||
+ char *id0, *id1;
|
||||
+ int l, r;
|
||||
+
|
||||
+ id0 = strdup(filename0);
|
||||
+ id1 = strdup(filename1);
|
||||
+
|
||||
+ l = strlen(id0);
|
||||
+ if (l > 5 && strcmp(id0 + l - 5, ".conf"))
|
||||
+ id0[l-5] = '\0';
|
||||
+
|
||||
+ l = strlen(id1);
|
||||
+ if (l > 5 && strcmp(id1 + l - 5, ".conf"))
|
||||
+ id1[l-5] = '\0';
|
||||
+
|
||||
+ r = split_cmp(id0, id1, 1);
|
||||
+
|
||||
+ free(id0);
|
||||
+ free(id1);
|
||||
+
|
||||
+ return r;
|
||||
}
|
||||
|
||||
+static int
|
||||
+bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
|
||||
+{
|
||||
+ return bls_cmp((*ent_a)->d_name, (*ent_b)->d_name);
|
||||
+}
|
||||
|
||||
static int
|
||||
scan_append_section_heading(struct scan_token* scan, int* index, char* name);
|
||||
--
|
||||
2.39.2
|
||||
|
84
s390-tools-zipl-invert-script-options.patch
Normal file
84
s390-tools-zipl-invert-script-options.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From 2faae5cf51c49e3f166b8526eee276dab2fe7308 Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||
Date: Wed, 30 May 2018 14:33:25 +0200
|
||||
Subject: [PATCH] zipl-switch-to-blscfg: invert ignore-default and
|
||||
use-version-name options
|
||||
|
||||
These options were added because the zipl maintainers wanted a different
|
||||
default behaviour for the migration script than the one we use. Instead
|
||||
of requiring to always use these options, just invert the logic for us.
|
||||
|
||||
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
||||
---
|
||||
scripts/zipl-switch-to-blscfg | 16 +++++++++-------
|
||||
scripts/zipl-switch-to-blscfg.1 | 8 ++++----
|
||||
2 files changed, 13 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/scripts/zipl-switch-to-blscfg b/scripts/zipl-switch-to-blscfg
|
||||
index 871935c783f..d8d5eca5867 100755
|
||||
--- a/scripts/zipl-switch-to-blscfg
|
||||
+++ b/scripts/zipl-switch-to-blscfg
|
||||
@@ -57,14 +57,14 @@ Options:
|
||||
--backup-suffix=SUFFIX suffix used for backup files, defaults to .bak
|
||||
--bls-directory=DIR path to generate BLS files, defaults to /boot/loader/entries
|
||||
--config-file=FILE path to zipl configuration file, defaults to /etc/zipl.conf
|
||||
- --ignore-default ignore the default option from the zipl configuration file
|
||||
- --use-version-name use the section kernel version as the BLS file name
|
||||
+ --leave-default leave the default option from the zipl configuration file
|
||||
+ --use-section-name use the section name as the BLS file name
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
OPTS="$(getopt -o hv --long help,version,backup-suffix:,bls-directory:,config-file:,\
|
||||
-ignore-default,use-version-name -n \'$SCRIPTNAME\' -- "$@")"
|
||||
+leave-default,use-section-name -n \'$SCRIPTNAME\' -- "$@")"
|
||||
eval set -- "$OPTS"
|
||||
|
||||
BACKUP_SUFFIX=.bak
|
||||
@@ -73,6 +73,8 @@ CMDLINE_LINUX_DEBUG=" systemd.log_level=debug systemd.log_target=kmsg"
|
||||
LINUX_DEBUG_VERSION_POSTFIX="_with_debugging"
|
||||
LINUX_DEBUG_TITLE_POSTFIX=" with debugging"
|
||||
CONFIG="/etc/zipl.conf"
|
||||
+ignore_default=true
|
||||
+version_name=true
|
||||
|
||||
while [ ${#} -gt 0 ]; do
|
||||
case "$1" in
|
||||
@@ -96,11 +98,11 @@ while [ ${#} -gt 0 ]; do
|
||||
CONFIG=${2}
|
||||
shift
|
||||
;;
|
||||
- --ignore-default)
|
||||
- ignore_default=true
|
||||
+ --leave-default)
|
||||
+ ignore_default=false
|
||||
;;
|
||||
- --use-version-name)
|
||||
- version_name=true
|
||||
+ --use-section-name)
|
||||
+ version_name=false
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
diff --git a/scripts/zipl-switch-to-blscfg.8 b/scripts/zipl-switch-to-blscfg.8
|
||||
index 6bd14d00d14..71b904ffd1c 100644
|
||||
--- a/scripts/zipl-switch-to-blscfg.8
|
||||
+++ b/scripts/zipl-switch-to-blscfg.8
|
||||
@@ -37,9 +37,9 @@ The DIRECTORY where the BLS fragments will be generated. The directory is create
|
||||
The FILE used for zipl configuration file, defaults to /etc/zipl.conf.
|
||||
|
||||
.TP
|
||||
-\fB\-\-ignore-default\fP
|
||||
-Ignore the default option from the zipl configuration file
|
||||
+\fB\-\-leave-default\fP
|
||||
+Leave the default option from the zipl configuration file
|
||||
|
||||
.TP
|
||||
-\fB\-\-use-version-name\fP
|
||||
-Use the section kernel version as the BLS file name
|
||||
+\fB\-\-use-section-name\fP
|
||||
+Use the section name as the BLS file name
|
||||
--
|
||||
2.17.0
|
||||
|
5
s390.csh
5
s390.csh
@ -1,5 +0,0 @@
|
||||
# /etc/profile.d/s390.csh - set TERM variable
|
||||
|
||||
if ( `/sbin/consoletype stdout` == "serial" ) then
|
||||
setenv TERM dumb
|
||||
endif
|
6
s390.sh
6
s390.sh
@ -1,6 +0,0 @@
|
||||
# /etc/profile.d/s390.sh - set TERM variable
|
||||
|
||||
contype=`/sbin/consoletype stdout`
|
||||
if [ "$contype" = "serial" ]; then
|
||||
export TERM=dumb
|
||||
fi
|
0
s390utils-2.31.0-fedora.patch
Normal file
0
s390utils-2.31.0-fedora.patch
Normal file
1032
s390utils.spec
1032
s390utils.spec
File diff suppressed because it is too large
Load Diff
5
sources
5
sources
@ -1,3 +1,2 @@
|
||||
SHA512 (cmsfs-1.1.8c.tar.gz) = 2ba5687d378fdd9871283728e81f1399047e74f9bba3936726eda11a978fe6ced1a300f15acb871d5daa26e61069d89767c753cf584f2731f5e99985db96aef0
|
||||
SHA512 (src_vipa-2.1.0.tar.gz) = 8f6048e82b4bcc479dfb09d62da64b9519f66efc31889ff795ee6ca107e262167df57628c305f1b899c41bb3f035e6309552d8548c890855d319e8e60d6a6cf7
|
||||
SHA512 (s390-tools-2.1.0.tar.gz) = a1e2f7cda8a16f9ea3c5e7bfe118dd8044542b4fee7086a3656fc985f64170e29884177004265e9f0802c45fa04057edf665feccebeb38dc0f5515093ccf31aa
|
||||
SHA512 (s390-tools-2.31.0.tar.gz) = d05722dff760605baad92b25a7a9264b3c936ff851b87a02ab39604a74d02ae4e14632d9b3d83eb9cb82a14bfcbb0d40bb4797896051ed3dd36d7690abfb1c64
|
||||
SHA512 (s390-tools-2.31.0-rust-vendor.tar.xz) = f9dc2887bb2502ba6f71ef7ea807380c322a46df8c65f0fc7993f3fb4eec4da120369d3e380dbcca9b6250307da0f6236a649504d542f44730e8009ace8ed450
|
||||
|
27
zfcpconf.sh
27
zfcpconf.sh
@ -2,10 +2,12 @@
|
||||
|
||||
# config file syntax:
|
||||
# deviceno WWPN FCPLUN
|
||||
# deviceno # allowed when auto LUN scan is enabled and port is in NPIV mode
|
||||
#
|
||||
# Example:
|
||||
# 0.0.4000 0x5005076300C213e9 0x5022000000000000
|
||||
# 0.0.4001 0x5005076300c213e9 0x5023000000000000
|
||||
# 0.0.5000
|
||||
#
|
||||
#
|
||||
# manual setup:
|
||||
@ -21,12 +23,20 @@
|
||||
CONFIG=/etc/zfcp.conf
|
||||
PATH=/bin:/sbin
|
||||
|
||||
set_online()
|
||||
{
|
||||
DEVICE=$1
|
||||
|
||||
[ `cat /sys/bus/ccw/drivers/zfcp/${DEVICE}/online` = "0" ] \
|
||||
&& echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online
|
||||
}
|
||||
|
||||
if [ -f "$CONFIG" ]; then
|
||||
if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
|
||||
modprobe zfcp
|
||||
fi
|
||||
if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
|
||||
return
|
||||
exit 1
|
||||
fi
|
||||
sed 'y/ABCDEF/abcdef/' < $CONFIG | while read line; do
|
||||
case $line in
|
||||
@ -34,6 +44,17 @@ if [ -f "$CONFIG" ]; then
|
||||
*)
|
||||
[ -z "$line" ] && continue
|
||||
set $line
|
||||
if [ $# -eq 1 ]; then
|
||||
DEVICE=${1##*0x}
|
||||
if [ `cat /sys/module/zfcp/parameters/allow_lun_scan` = "Y" ]; then
|
||||
set_online ${DEVICE}
|
||||
grep -q NPIV /sys/bus/ccw/devices/${DEVICE}/host*/fc_host/host*/port_type || \
|
||||
echo "Error: Only device ID (${DEVICE}) given, but port not in NPIV mode"
|
||||
else
|
||||
echo "Error: Only device ID (${DEVICE}) given, but LUN scan is disabled for the zfcp module"
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
if [ $# -eq 5 ]; then
|
||||
DEVICE=$1
|
||||
SCSIID=$2
|
||||
@ -46,11 +67,11 @@ if [ -f "$CONFIG" ]; then
|
||||
WWPN=$2
|
||||
FCPLUN=$3
|
||||
fi
|
||||
[ `cat /sys/bus/ccw/drivers/zfcp/${DEVICE}/online` = "0" ] \
|
||||
&& echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online
|
||||
set_online ${DEVICE}
|
||||
[ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/${FCPLUN} ] \
|
||||
&& echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/unit_add
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user