From 42d33db44b725aa666fe0587fd8af8f7e461767d Mon Sep 17 00:00:00 2001 From: "mauro.giachero" Date: Wed, 29 Apr 2009 14:35:04 +0000 Subject: [PATCH] Fix installed packages list not shown with no packages installed. Signed-off-by: Mauro Giachero --- src/usr/sbin/sbopkg | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 7a5afaa..3756a0f 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -316,10 +316,18 @@ get_sbo_packages() { for FILE in $PKGS; do echo $FILE >> $SBOPKGLIST done - if [[ $DIAG ]]; then - dialog --title "Installed SBo Packages" --textbox $SBOPKGLIST 20 65 + if [[ -f $SBOPKGLIST ]]; then + if [[ $DIAG ]]; then + dialog --title "Installed SBo Packages" --textbox $SBOPKGLIST \ + 20 65 + else + ${PAGER:-more} $SBOPKGLIST + fi else - ${PAGER:-more} $SBOPKGLIST + if [[ $DIAG ]]; then + dialog --title "No packages found" --msgbox "$(crunch_fmt "It \ + appears that you have no SBo packages installed.")" 8 40 + fi fi }