From 0444dbdb94aa25b06805da115b585a7860aea67a1f48407506bae4b59d0911f3 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Tue, 25 Nov 2014 07:49:22 +0000 Subject: [PATCH] Accepting request 261978 from home:Ledest:bashisms fix bashisms in ultrabayd and udev.idedma.sh scripts OBS-URL: https://build.opensuse.org/request/show/261978 OBS-URL: https://build.opensuse.org/package/show/Base:System/hdparm?expand=0&rev=74 --- hdparm-9.43-fix-bashisms.patch | 12 ++++++++++++ hdparm.changes | 7 +++++++ hdparm.spec | 2 ++ udev.idedma.sh | 5 +++-- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 hdparm-9.43-fix-bashisms.patch diff --git a/hdparm-9.43-fix-bashisms.patch b/hdparm-9.43-fix-bashisms.patch new file mode 100644 index 0000000..763f3c5 --- /dev/null +++ b/hdparm-9.43-fix-bashisms.patch @@ -0,0 +1,12 @@ +diff -Ndur hdparm-9.43/contrib/ultrabayd hdparm-9.43-fix-bashisms/contrib/ultrabayd +--- hdparm-9.43/contrib/ultrabayd 2000-02-04 22:30:30.000000000 +0200 ++++ hdparm-9.43-fix-bashisms/contrib/ultrabayd 2014-11-17 04:17:08.381048316 +0200 +@@ -41,7 +41,7 @@ + END + + if [ "$d_type" != "$o_d_type" ] || [ "$d_id" != "$o_d_id" ]; then +- echo -n "\07" > /dev/tty1 ++ printf "\07" > /dev/tty1 + + o_d_type="$d_type" + o_d_id="$d_id" diff --git a/hdparm.changes b/hdparm.changes index 330ca19..54043d0 100644 --- a/hdparm.changes +++ b/hdparm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 17 02:21:00 UTC 2014 - Led + +- fix bashisms in ultrabayd and udev.idedma.sh scripts +- add patches: + * hdparm-9.43-fix-bashisms.patch + ------------------------------------------------------------------- Fri Sep 19 05:49:02 UTC 2014 - crrodriguez@opensuse.org diff --git a/hdparm.spec b/hdparm.spec index ccfe479..04c7e9f 100644 --- a/hdparm.spec +++ b/hdparm.spec @@ -31,6 +31,7 @@ Source3: udev.idedma.sh Patch1: hdparm-nostrip.patch Patch2: hdparm-wiper-warn.patch Patch3: hdparm-leak-fix.patch +Patch4: hdparm-9.43-fix-bashisms.patch BuildRequires: pkgconfig BuildRequires: pkgconfig(udev) Url: http://sourceforge.net/projects/hdparm/ @@ -48,6 +49,7 @@ driver and IDE drives. %patch1 %patch2 -p1 %patch3 +%patch4 -p1 %build make CFLAGS="$RPM_OPT_FLAGS -Wall -Wstrict-prototypes" LDFLAGS= CC="%{__cc}" diff --git a/udev.idedma.sh b/udev.idedma.sh index 8240fa8..7f7a3be 100644 --- a/udev.idedma.sh +++ b/udev.idedma.sh @@ -35,15 +35,16 @@ for dev in $DEVICES_FORCE_IDE_DMA ; do IFS=":" for d in $dev ; do - case $((FIRST++)) in + case $FIRST in 0) DEVICE=$d ;; 1) MODE=$d ;; *) OPTIONS="$OPTIONS$d:" esac + FIRST=$((FIRST + 1)) done unset d - if [ "$DEVICE" == "$1" ] ; then + if [ "$DEVICE" = "$1" ] ; then echo "$DEVICE: setting up IDE DMA mode $MODE" # Set DMA mode by hdparm utility