Bug#784911: None borne shell compatible script /bin/fsck.btrfs breaks initrd

2015-06-18 Thread Daniel Andersson
Package: btrfs-tools
Version: 4.0-2
Followup-For: Bug #784911

Noticed this Bashism as well. Comparing with booleans (or boolean-like
variables as in this case) is generally not necessary; before I found this bug
report I had personally solved it as below using the POSIX built-in behaviour
for `true` and `false`, but details do not really matter.

--- /bin/fsck.btrfs.dist2015-06-18 18:31:38.233523691 +0200
+++ /bin/fsck.btrfs.fixed   2015-06-18 18:32:00.883858768 +0200
@@ -31,7 +31,7 @@
echo $0: $DEV does not exist
exit 8
 fi
-if [ $AUTO == false ]; then
+if ! $AUTO; then
echo If you wish to check the consistency of a BTRFS filesystem or
echo repair a damaged filesystem, see btrfs(8) subcommand 'check'.
 fi



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 4.0.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages btrfs-tools depends on:
ii  e2fslibs1.42.13-1
ii  libblkid1   2.26.2-6
ii  libc6   2.19-18
ii  libcomerr2  1.42.13-1
ii  liblzo2-2   2.08-1.2
ii  libuuid12.26.2-6
ii  zlib1g  1:1.2.8.dfsg-2+b1

btrfs-tools recommends no packages.

btrfs-tools suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#784911: None borne shell compatible script /bin/fsck.btrfs breaks initrd

2015-05-11 Thread Tareeq Ali
Hi

i'd like to confirm this bug as well as the patch does in fact resolve the
issue.  At boot up I would get the following error;

systemd-fsck[703]: /bin/fsck.btrfs: 34: [: true: unexpected operator

after applying the patch I no longer get this error.

-Tareeq


Bug#784911: None borne shell compatible script /bin/fsck.btrfs breaks initrd

2015-05-10 Thread Klaus Ethgen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Package: btrfs-tools
Version: 4.0-2
Severity: normal
Tags: patch

/bin/fsck.btrfs uses syntax that is not compatible to POSIX borne shell
syntax. As it is included in initram, breaks it somewhat.

Here is a patch to fix that:
   --- fsck.btrfs.distrib  2015-05-10 15:10:10.315185998 +0100
   +++ fsck.btrfs  2015-05-10 15:10:44.117891197 +0100
   @@ -31,7 +31,7 @@
   echo $0: $DEV does not exist
   exit 8
fi
   -if [ $AUTO == false ]; then
   +if [ x$AUTO = xfalse ]; then
   echo If you wish to check the consistency of a BTRFS filesystem or
   echo repair a damaged filesystem, see btrfs(8) subcommand 'check'.
fi

Note that this fixes two problems in one:
1. There is no such operator like == in borne shell. When will people
   accept that finally!?
2. Some shells evaluate the parameters to = so it is best to prefix it
   with some fixed string.

- -- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (110, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.19.5 (SMP w/8 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1) (ignored: LC_ALL set to 
de_DE)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages btrfs-tools depends on:
ii  e2fslibs1.42.12-1.1
ii  libblkid1   2.26.2-2
ii  libc6   2.19-18
ii  libcomerr2  1.42.12-1.1
ii  liblzo2-2   2.08-1.2
ii  libuuid12.25.2-6
ii  zlib1g  1:1.2.8.dfsg-2+b1

btrfs-tools recommends no packages.

btrfs-tools suggests no packages.

- -- no debconf information

- -- 
Klaus Ethgen  http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16   Klaus Ethgen kl...@ethgen.de
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQGcBAEBCgAGBQJVT2iwAAoJEKZ8CrGAGfasPsUMAMZNFJmgEQCCejzeSsD61Bce
+lD2sPtJMIZn44qy3ujo8qXi6gHAPo2L3nKb2f/uVrAb3EB2fdyLQhUQD4Bo1Rzc
KKpHRGOJPSUS3TIbDIIRxaRHahRB5SZFoEWxiyEp4SNaM8faBNwlay0Gk2CMnekX
FagBwEUHGNF0dpkir/U0DTdyVdlAg179X3X7hVlrgFqpnLsH9xFr7dXSEDFo1o5X
qZtLDNlVnRSLxc+XApnew4A4EHit6b0gLu/JkLf012iatReUXX612nteGC8TLj78
QJMB60ebMQivgVMAP8KYpRYMV9P8OGo8gB7POZeF2cz9AnzYAV1WRtbUXnLT8SkJ
uCHbIbP0E+v742FELJdu2+Z/GcFqRqhnSBCm1T+/HPZJPaxUIwrpUtXZSPkmSFRc
1KfHm7xWlALdZZUkJPP1ycjCKbLnYUgKCPkCqjVWYiulw8thJZ0IwIxSqMfRTLjs
7fQ4ClUxX/+ma9eio+tPVec0bT4AbtMqh2q6rRtBsA==
=14th
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org