Add is_fedora and exit_distro_not_supported functions
Between is_fedora, is_ubuntu and is_suse, we can make the code a bit
simpler to read. We also use exit_distro_not_supported to identify
places where we need implementation details for new distros.
As "/sbin/service --skip-redirect" is Fedora-specific, guard this with a
is_fedora test too.
Change-Id: Ic77c0697ed9be0dbb5df8e73da93463e76025f0c
diff --git a/tests/functions.sh b/tests/functions.sh
index d2cc5c4..be48729 100755
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -260,9 +260,11 @@
if [[ "$os_PACKAGE" = "deb" ]]; then
is_package_installed dpkg
VAL=$?
-else
+elif [[ "$os_PACKAGE" = "rpm" ]]; then
is_package_installed rpm
VAL=$?
+else
+ VAL=1
fi
if [[ "$VAL" -eq 0 ]]; then
echo "OK"
@@ -273,9 +275,11 @@
if [[ "$os_PACKAGE" = "deb" ]]; then
is_package_installed dpkg bash
VAL=$?
-else
+elif [[ "$os_PACKAGE" = "rpm" ]]; then
is_package_installed rpm bash
VAL=$?
+else
+ VAL=1
fi
if [[ "$VAL" -eq 0 ]]; then
echo "OK"