validate_deb - not redhat does not mean it is deb distro,
there can be other packaging systems
validate_rpm - we do not want to proceed for zypper based,
we only want to proceed for redhat like repo
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
set -ex
# Only do actual work when we are a DEB distro
-if test -f /etc/redhat-release ; then
- exit 0
-fi
+( source /etc/os-release
+ case $ID in
+ debian|ubuntu)
+ exit 0
+ ;;
+ *)
+ exit 1
+ ;;
+ esac) || exit 0
set -ex
# only do work if we are a RPM distro
-if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
- exit 0
-fi
+( source /etc/os-release
+ case $ID in
+ centos|rhel|fedora)
+ exit 0
+ ;;
+ *)
+ exit 1
+ ;;
+ esac) || exit 0