must use cat, can't use read in dash here

This commit is contained in:
Dustin Kirkland 2011-12-13 22:10:32 -06:00
commit b80879bae1
2 changed files with 4 additions and 3 deletions

1
debian/changelog vendored
View file

@ -4,6 +4,7 @@ byobu (4.55) unreleased; urgency=low
usr/lib/byobu/Makefile.am, usr/share/byobu/status/status, usr/lib/byobu/Makefile.am, usr/share/byobu/status/status,
usr/share/man/man1/byobu.1: usr/share/man/man1/byobu.1:
- add a system entropy status item - add a system entropy status item
- must use cat, can't use read in dash here
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 09 Dec 2011 20:38:02 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Fri, 09 Dec 2011 20:38:02 -0600

View file

@ -23,9 +23,9 @@ __entropy_detail() {
} }
__entropy() { __entropy() {
local e # Can't use 'read' here in dash, as it only reads the first byte
read e < /proc/sys/kernel/random/entropy_avail local e=$(cat /proc/sys/kernel/random/entropy_avail)
color k r; printf "e$e"; color -- color K R; printf "e%s" "$e"; color --
} }
# vi: syntax=sh ts=4 noexpandtab # vi: syntax=sh ts=4 noexpandtab