mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/lib/byobu/raid: LP: #1006971
- ensure raid status cache gets cleared out when done rebuilding
This commit is contained in:
parent
9bb8562f55
commit
f6efb9eb0c
2 changed files with 12 additions and 4 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -10,6 +10,8 @@ byobu (5.20) unreleased; urgency=low
|
||||||
- drop run-one usage, use flock directly instead
|
- drop run-one usage, use flock directly instead
|
||||||
* debian/control, usr/share/byobu/windows/common:
|
* debian/control, usr/share/byobu/windows/common:
|
||||||
- fix some lintian warnings and errors
|
- fix some lintian warnings and errors
|
||||||
|
* usr/lib/byobu/raid: LP: #1006971
|
||||||
|
- ensure raid status cache gets cleared out when done rebuilding
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 08 Jun 2012 17:25:23 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 08 Jun 2012 17:25:23 -0500
|
||||||
|
|
||||||
|
|
|
@ -29,15 +29,21 @@ __raid() {
|
||||||
# Errors in your raid
|
# Errors in your raid
|
||||||
case "$line" in
|
case "$line" in
|
||||||
*\ blocks\ *\[*_*\]$)
|
*\ blocks\ *\[*_*\]$)
|
||||||
[ -z "${msg}" ] && msg="RAID";;
|
[ -z "${msg}" ] && msg="RAID"
|
||||||
|
;;
|
||||||
*%*)
|
*%*)
|
||||||
p="${line%%\%*}${PCT}"; p=${p##* };
|
p="${line%%\%*}${PCT}"; p=${p##* };
|
||||||
[ -z "$msg" ] && msg="RAID"
|
[ -z "$msg" ] && msg="RAID"
|
||||||
msg="$msg,$p";;
|
msg="$msg,$p"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done < /proc/mdstat
|
done < /proc/mdstat
|
||||||
[ -n "$msg" ] || return
|
if [ -n "$msg" ]; then
|
||||||
color B w r; printf "%s" "$msg"; color --
|
color B w r; printf "%s" "$msg"; color --
|
||||||
|
elif [ -e "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/raid" ]; then
|
||||||
|
# Clear out cached raid message
|
||||||
|
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/raid"*
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# vi: syntax=sh ts=4 noexpandtab
|
# vi: syntax=sh ts=4 noexpandtab
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue