Преглед изворни кода

dselect-multicd: fix bashism in setup script

Use printf instead of echo -e. Closes: #530070
Raphaël Hertzog пре 17 година
родитељ
комит
0c21f16179
2 измењених фајлова са 4 додато и 3 уклоњено
  1. 1 0
      debian/changelog
  2. 3 3
      dselect/methods/multicd/setup

+ 1 - 0
debian/changelog

@@ -51,6 +51,7 @@ dpkg (1.15.5) UNRELEASED; urgency=low
     method. Closes: #402527
     method. Closes: #402527
   * Integrate dpkg-multicd into dselect. Add the required Replaces and
   * Integrate dpkg-multicd into dselect. Add the required Replaces and
     Conflicts. The dpkg-scanpackages fork is dropped. Closes: #516631
     Conflicts. The dpkg-scanpackages fork is dropped. Closes: #516631
+  * Fix bashisms in dselect multicd access method. Closes: #530070
 
 
   [ Updated dpkg translations ]
   [ Updated dpkg translations ]
   * German (Sven Joachim).
   * German (Sven Joachim).

+ 3 - 3
dselect/methods/multicd/setup

@@ -119,7 +119,7 @@ getblockdev () {
 		then
 		then
 			blockbase="`echo \"$tryblockdevice\" | sed -e 's/[0-9]\{1,\}$//'`"
 			blockbase="`echo \"$tryblockdevice\" | sed -e 's/[0-9]\{1,\}$//'`"
 			set +e
 			set +e
-			echo -e "p\nq\n" | fdisk "$blockbase" 2>/dev/null >$tp.f
+			printf 'p\nq\n' | fdisk "$blockbase" 2>/dev/null >$tp.f
 			set -e
 			set -e
 			proposeddevice="$tryblockdevice" perl -ne '
 			proposeddevice="$tryblockdevice" perl -ne '
 next unless /^ *Device +Boot +Begin +Start +End +Blocks +Id +System *$/i .. !/\S/;
 next unless /^ *Device +Boot +Begin +Start +End +Blocks +Id +System *$/i .. !/\S/;
@@ -334,10 +334,10 @@ fi
 if [ $option = harddisk2 ]
 if [ $option = harddisk2 ]
 then
 then
 	set +e
 	set +e
-	echo -e 'p\nq\n' | fdisk /dev/hda 2>/dev/null >$tp.f
+	printf 'p\nq\n' | fdisk /dev/hda 2>/dev/null >$tp.f
 	if [ $? != 0 ]
 	if [ $? != 0 ]
 	then
 	then
-		echo -e 'p\nq\n' | fdisk /dev/sda 2>/dev/null >$tp.f
+		printf 'p\nq\n' | fdisk /dev/sda 2>/dev/null >$tp.f
 	fi
 	fi
 	set -e
 	set -e
 	perl -ne '
 	perl -ne '