* usr/lib/byobu/include/icons, usr/lib/byobu/reboot_required,

usr/lib/byobu/updates_available:
  - add an checkbox icon
* usr/lib/byobu/include/icons, usr/lib/byobu/include/select-
  session.py, usr/lib/byobu/reboot_required,
  usr/lib/byobu/updates_available:
This commit is contained in:
Dustin Kirkland 2016-06-27 15:46:56 -05:00
commit a80cd6da1c
4 changed files with 25 additions and 9 deletions

8
debian/changelog vendored
View file

@ -1,8 +1,12 @@
byobu (5.109) unreleased; urgency=medium
* usr/lib/byobu/updates_available:
- add an asterisk icon
* usr/lib/byobu/include/icons, usr/lib/byobu/reboot_required,
usr/lib/byobu/updates_available:
- add an checkbox icon
- fix formatting again
* usr/lib/byobu/include/icons, usr/lib/byobu/include/select-
session.py, usr/lib/byobu/reboot_required,
usr/lib/byobu/updates_available:
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 31 May 2016 10:03:15 -0500

View file

@ -53,7 +53,9 @@ if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then
#ICON_MBPS="㏔㎰"
ICON_MBPS="Mb"
ICON_SESSION="〣"
ICON_LIVEPATCHED="🗹 "
else
# Only use 0-127 ANSI: http://ascii-table.com/ascii.php
ICON_C="C"
ICON_F="F"
ICON_RD="<"
@ -76,4 +78,5 @@ else
ICON_GHz="GHz"
ICON_MBPS="Mbps"
ICON_SESSION="|"
ICON_LIVEPATCHED="[/]"
fi

View file

@ -33,11 +33,26 @@ __reboot_required_detail() {
__reboot_required() {
local status="$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/reboot_required"
local livepatched=0
if [ -e "$UNATTENDED_UPGRADE_FLAG" ]; then
color b R W; printf "$ICON_UPGRADE "; color --;
fi
while read line; do
set -- ${line}
case "$line" in
kpatch_livepatch_*)
color k G; printf "$ICON_LIVEPATCHED"; color -;
livepatched=1
break
;;
esac
done < /proc/modules
if [ -e "$REBOOT_FLAG" ]; then
color b W; printf "$ICON_REBOOT"; color --;
if [ "$livepatched" = "1" ]; then
color k G; printf "$ICON_REBOOT"; color --;
else
color b k R; printf "$ICON_REBOOT"; color --;
fi
fi
if [ -e "$RELOAD_FLAG" ]; then
color b W; printf "<"; color -; color b b W; printf "F5"; color -; color b W; printf ">"; color -; printf " "

View file

@ -22,14 +22,8 @@
___print_updates() {
local u= s=
read u s < "$1"
if [ -n "$(lsmod | grep ^kpatch_livepatch_)" ]; then
color b r W; printf "*"; color --
fi
if [ -n "$u" ]; then
if [ "$u" -gt 0 ]; then
if [ -n "$(lsmod | grep ^kpatch_livepatch_)" ]; then
color b r W; printf "*"; color -
fi
color b r W; printf "%d" "$u"; color -; color r W
if [ -n "$s" ] && [ "$s" -gt 0 ]; then
printf "$ICON_SECURITY"