|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [raisin][PATCH] Gracefully handle an unsupported distro.
When your distro is not supported, handle the case gracefully and let
the user know instead of spitting out bash errors.
Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx>
---
lib/common-functions.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index efde84c..c52174a 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -176,6 +176,7 @@ function get_distro() {
;;
*)
DISTRO=$os_VENDOR
+ PKGTYPE="unknown"
;;
esac
@@ -220,6 +221,16 @@ function _install-package-rpm() {
$SUDO yum install -y $* > /dev/null
}
+function _check-package-unknown() {
+ error_echo "I don't know distro $DISTRO. It might be missing packages."
+ return 1
+}
+
+function _install-package-unknown() {
+ error_echo "I don't know distro $DISTRO. Cannot install packages."
+ return 1
+}
+
# Modifies inherited variable "missing"
function check-package() {
for p in $*
--
2.4.6
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |