aports/main/s390-tools/bash.patch
Tuan Hoang c66ec7eacf main/s390-tools: fix bash scripts
Install bash as runtime dependency to run zconf scripts
2019-04-30 10:11:50 +00:00

74 lines
2.3 KiB
Diff

diff --git a/scripts/dbginfo.sh b/scripts/dbginfo.sh
index bac62f0..3bed72a 100755
--- a/scripts/dbginfo.sh
+++ b/scripts/dbginfo.sh
@@ -1125,7 +1125,7 @@ exec 8>&1 9>&2 >"${LOGFILE}" 2>&1
trap emergency_exit SIGHUP SIGINT SIGTERM
pr_log_stdout ""
-pr_log_stdout "Hardware platform = $(uname -i)"
+pr_log_stdout "Hardware platform = $(uname -m)"
pr_log_stdout "Kernel version = ${KERNEL_VERSION}.${KERNEL_MAJOR_REVISION}.${KERNEL_MINOR_REVISION} ($(uname -r 2>/dev/null))"
pr_log_stdout "Runtime environment = ${RUNTIME_ENVIRONMENT}"
pr_log_stdout ""
diff --git a/zconf/chccwdev b/zconf/chccwdev
index b1140c0..2c3ca6a 100755
--- a/zconf/chccwdev
+++ b/zconf/chccwdev
@@ -429,9 +429,9 @@ for BUSID in $BUSIDLIST; do
exit 1
fi
if [ "$FORCE" != "" ]; then
- echo $FORCE 2>&1 >$SYSPATH/$ONLINEATTR | PrintError
+ echo -n $FORCE 2>&1 >$SYSPATH/$ONLINEATTR | PrintError
else
- echo $ONLINE 2>&1 > $SYSPATH/$ONLINEATTR | PrintError
+ echo -n $ONLINE 2>&1 > $SYSPATH/$ONLINEATTR | PrintError
fi
#
diff --git a/zconf/dasdstat b/zconf/dasdstat
index 8303882..6c64616 100755
--- a/zconf/dasdstat
+++ b/zconf/dasdstat
@@ -273,7 +273,7 @@ function enable_stat() {
echo "$CMD: Statistic \"$myfile\" does not exist" >&2
return
fi
- if echo on > "$myfile"
+ if echo -n on > "$myfile"
then
echo "enable statistic \"$myfile\""
else
@@ -288,7 +288,7 @@ function disable_stat() {
echo "$CMD: Statistic \"$myfile\" does not exist" >&2
return
fi
- if echo off > "$myfile"
+ if echo -n off > "$myfile"
then
echo "disable statistic \"$myfile\""
else
@@ -303,7 +303,7 @@ function reset_stat() {
echo "$CMD: Statistic \"$myfile\" does not exist" >&2
return
fi
- if echo reset > "$myfile"
+ if echo -n reset > "$myfile"
then
echo "reset statistic \"$myfile\""
else
diff --git a/zconf/lsdasd b/zconf/lsdasd
index 26ac0b4..e95735e 100755
--- a/zconf/lsdasd
+++ b/zconf/lsdasd
@@ -106,7 +106,7 @@ function listDASDDeviceDirectories() {
SEARCHDIRS="$SEARCHDIRS $DRIVERFBA"
fi
if [[ -n "$SEARCHDIRS" ]]; then
- find $SEARCHDIRS -type l -printf "%h/%l\n" 2> /dev/null
+ find $SEARCHDIRS -type l -exec readlink -f {} \; 2> /dev/null
else
# The above paths may become invalid in the future, so we keep the
# following query as backup: