The get* functions now fallback to 'Unknown' instead of printing nothing

This commit is contained in:
dylan araps 2016-01-04 09:25:30 +11:00
parent cd4848e27c
commit c034067573

View file

@ -212,6 +212,10 @@ getdistro () {
"OpenBSD")
distro="OpenBSD"
;;
*)
distro="Unknown"
;;
esac
}
@ -242,6 +246,10 @@ getuptime () {
uptime=${uptime# }
uptime="${uptime# * up }"
;;
*)
uptime="Unknown"
;;
esac
}
@ -285,7 +293,9 @@ getpackages () {
packages=$(pkg_info | wc -l)
;;
*) packages="Unknown" ;;
*)
packages="Unknown"
;;
esac
}