[Bug 1261005] [NEW] blkid -U takes all input literally

Andrey Konstantinov andreyinvolute at gmail.com
Sat Dec 14 17:04:22 UTC 2013


Public bug reported:

Any arguments to blkid -U are interpreted as plain text. For example:

root=`grep '/ ' /etc/fstab |sed 's/\ .*//' | grep -v '#'`

will assign value of root device UUID to variable "root". Check by

echo "Root UUID is $root"

which outputs something like

Root UUID is UUID=584ec171-32c1-471d-bbdc-45ad4dd52b71

Now run

blkid -U $root

No output. Running blkid -U UUID where UUID is a manually typed UUID
will work, however.

Another variation:

blkid -U `grep '/ ' /etc/fstab |sed 's/\ .*//' | grep -v '#'`

should interpret the result of command in backticks as the UUID to look
for (because that's what that command outputs!) Instead, no output
again. This is highly annoying since it prevents any input to blkid -U
except manual.

I should point out that blkid -L behaves the same way if a label is
supplied via a variable or output of command in backticks. Clearly, it
doesn't recognize that I'm trying to pass a variable and instead
interprets it as plain text and as a result, does not display any
label/UUID matches.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: util-linux 2.20.1-1ubuntu3
ProcVersionSignature: Ubuntu 3.8.0-29.42~precise1-generic 3.8.13.5
Uname: Linux 3.8.0-29-generic i686
ApportVersion: 2.0.1-0ubuntu17.4
Architecture: i386
Date: Sat Dec 14 22:22:35 2013
InstallationMedia: Ubuntu 12.04.3 LTS "Precise Pangolin" - Release i386 (20130820.1)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_IN:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: util-linux
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: util-linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug blkid i386 precise

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1261005

Title:
  blkid -U takes all input literally

Status in “util-linux” package in Ubuntu:
  New

Bug description:
  Any arguments to blkid -U are interpreted as plain text. For example:

  root=`grep '/ ' /etc/fstab |sed 's/\ .*//' | grep -v '#'`

  will assign value of root device UUID to variable "root". Check by

  echo "Root UUID is $root"

  which outputs something like

  Root UUID is UUID=584ec171-32c1-471d-bbdc-45ad4dd52b71

  Now run

  blkid -U $root

  No output. Running blkid -U UUID where UUID is a manually typed UUID
  will work, however.

  Another variation:

  blkid -U `grep '/ ' /etc/fstab |sed 's/\ .*//' | grep -v '#'`

  should interpret the result of command in backticks as the UUID to
  look for (because that's what that command outputs!) Instead, no
  output again. This is highly annoying since it prevents any input to
  blkid -U except manual.

  I should point out that blkid -L behaves the same way if a label is
  supplied via a variable or output of command in backticks. Clearly, it
  doesn't recognize that I'm trying to pass a variable and instead
  interprets it as plain text and as a result, does not display any
  label/UUID matches.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: util-linux 2.20.1-1ubuntu3
  ProcVersionSignature: Ubuntu 3.8.0-29.42~precise1-generic 3.8.13.5
  Uname: Linux 3.8.0-29-generic i686
  ApportVersion: 2.0.1-0ubuntu17.4
  Architecture: i386
  Date: Sat Dec 14 22:22:35 2013
  InstallationMedia: Ubuntu 12.04.3 LTS "Precise Pangolin" - Release i386 (20130820.1)
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=en_IN:en
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_IN
   SHELL=/bin/bash
  SourcePackage: util-linux
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1261005/+subscriptions



More information about the foundations-bugs mailing list