usr/lib/byobu/disk_io: conditionally use readlink -f, LP: #764584

This commit is contained in:
Dustin Kirkland 2011-04-19 16:32:53 -04:00
commit d73ea2ae2e
2 changed files with 3 additions and 1 deletions

1
debian/changelog vendored
View file

@ -1,6 +1,7 @@
byobu (3.33) unreleased; urgency=low
* usr/bin/byobu-launch: make sure this finishes with a true
* usr/lib/byobu/disk_io: conditionally use readlink -f, LP: #764584
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 17 Apr 2011 13:30:34 -0500

View file

@ -29,7 +29,8 @@ case $MP in
/dev/*) disk="$MP" ;;
*) disk=$(grep -m 1 " $MP " /etc/mtab | sed -e "s: .*$::") ;;
esac
disk=$(readlink "$disk" | sed -e "s: .*$::" -e "s:^.*/::" -e "s:\([hsv]d[a-z]\)[0-9]*$:\1:")
which greadlink 2>/dev/null && READLINK="greadlink" || READLINK="readlink"
disk=$($READLINK -f "$disk" | sed -e "s: .*$::" -e "s:^.*/::" -e "s:\([hsv]d[a-z]\)[0-9]*$:\1:")
if [ "$1" = "--detail" ]; then
if which iostat >/dev/null; then