From 748002f2e5252fcb0f5b4b1352bff513df252f4d Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Sun, 28 Feb 2016 23:19:46 -0600 Subject: [PATCH] * usr/lib/byobu/include/icons, usr/lib/byobu/reboot_required, usr/share/man/man1/byobu.1: - add an indicator for an unattended upgrade in progress --- debian/changelog | 3 +++ usr/lib/byobu/include/icons | 2 ++ usr/lib/byobu/reboot_required | 4 ++++ usr/share/man/man1/byobu.1 | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 14281d8e..d6efaf07 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,9 @@ byobu (5.103) unreleased; urgency=medium * usr/share/byobu/keybindings/f-keys.screen, usr/share/byobu/keybindings/f-keys.tmux: LP: #1543903 - use $EDITOR rather than 'view' + * usr/lib/byobu/include/icons, usr/lib/byobu/reboot_required, + usr/share/man/man1/byobu.1: + - add an indicator for an unattended upgrade in progress -- Dustin Kirkland Thu, 04 Feb 2016 16:30:00 -0600 diff --git a/usr/lib/byobu/include/icons b/usr/lib/byobu/include/icons index b7298911..707174ed 100755 --- a/usr/lib/byobu/include/icons +++ b/usr/lib/byobu/include/icons @@ -35,6 +35,7 @@ if [ "$BYOBU_BACKEND" = "tmux" ] && [ "$BYOBU_CHARMAP" = "UTF-8" ]; then ICON_WIFI= ICON_REBOOT="⟳" ICON_UPDATES="!" + ICON_UPGRADE="⚠" ICON_SECURITY="‼" #ICON_KB="㎅" #ICON_MB="㎆" @@ -64,6 +65,7 @@ else ICON_WIFI= ICON_REBOOT="(R)" ICON_UPDATES="!" + ICON_UPGRADE="/!\\\\\\" ICON_SECURITY="!!" ICON_KB="KB" ICON_MB="MB" diff --git a/usr/lib/byobu/reboot_required b/usr/lib/byobu/reboot_required index 7d4b7ffe..f2e61060 100755 --- a/usr/lib/byobu/reboot_required +++ b/usr/lib/byobu/reboot_required @@ -22,6 +22,7 @@ REBOOT_FLAG="/var/run/reboot-required" RELOAD_FLAG="$BYOBU_RUN_DIR/reload-required" POWERNAP_FLAG="/var/run/powernap/powersave" +UNATTENDED_UPGRADE_FLAG="/var/run/unattended-upgrades.pid" __reboot_required_detail() { [ -e "$REBOOT_FLAG" ] && ls -alF "$REBOOT_FLAG" 2>&1 @@ -32,6 +33,9 @@ __reboot_required_detail() { __reboot_required() { local status="$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/reboot_required" + if [ -e "$UNATTENDED_UPGRADE_FLAG" ]; then + color b R W; printf "$ICON_UPGRADE "; color --; + fi if [ -e "$REBOOT_FLAG" ]; then color b W; printf "$ICON_REBOOT"; color --; fi diff --git a/usr/share/man/man1/byobu.1 b/usr/share/man/man1/byobu.1 index ab19dc1b..5fa7d73c 100644 --- a/usr/share/man/man1/byobu.1 +++ b/usr/share/man/man1/byobu.1 @@ -85,7 +85,7 @@ The background colors of the \fBbyobu\fP status lines can be adjusted by editing \fBprocesses\fP \- total number of processes running on the system; displayed in the lower bar in white text on a dark yellow background with a trailing '&' indicating 'background processes' -\fBreboot_required\fP \- symbol present if a reboot is required following a system update; displayed in the lower bar white text on a blue background by the symbol '(R)'; additionally, reboot_required will print '' in white text on a blue background, if Byobu requires you to reload your profile to affect some changes; it will also detect if your system is currently in \fBpowernap\fP(8) state and if so print '.zZ'. +\fBreboot_required\fP \- symbol present if a reboot is required following a system update; displayed in the lower bar white text on a blue background by the symbol '(R)'; additionally, reboot_required will print '' in white text on a blue background, if Byobu requires you to reload your profile to affect some changes; it will also detect if your system is currently in \fBpowernap\fP(8) state and if so print '.zZ'; if your system is currently performing an \fBunattended-upgrade\fP(1) you will see a white warning sign on a red background. \fBrelease\fP \- OS/distribution name of the release running on the current system as reported by \fBlsb_release(1)\fP or \fI/etc/issue\fP; displayed in the lower bar in bold black text toward the left on a grey background; you may override the detected release with RELEASE=Whatever in \fI$BYOBU_CONFIG_DIR/statusrc\fP; you may also abbreviate the release string to N characters by setting RELEASE_ABBREVIATED=N in \fI$BYOBU_CONFIG_DIR/statusrc\fP