-# Verify ODL not installed
-if yum list installed opendaylight; then
- # Fail if exit code 0, ie ODL is still installed
- echo "OpenDaylight unexpectedly still installed"
- exit 1
+ # Verify ODL not installed
+ if yum list installed opendaylight; then
+ # Fail if exit code 0, ie ODL is still installed
+ echo "OpenDaylight unexpectedly still installed"
+ exit 1
+ else
+ echo "OpenDaylight not installed, as expected"
+ fi
+elif [ -f /usr/bin/zypper ]; then
+ # Uninstall ODL
+ sudo zypper -n remove opendaylight
+
+ # Verify ODL not installed
+ if zypper search --installed-only opendaylight; then
+ # Fail if exit code 0, ie ODL is still installed
+ echo "OpenDaylight unexpectedly still installed"
+ exit 1
+ else
+ echo "OpenDaylight not installed, as expected"
+ fi