#!/bin/sh
# preremove for OZSWopenssh
# Disables and deletes the SMF service before package removal.

FMRI="svc:/ozone/sshd:default"
MANIFEST="/var/svc/manifest/ozone/sshd.xml"

if [ -x /usr/sbin/svcadm ]; then
    /usr/sbin/svcadm disable -s "$FMRI" 2>/dev/null || true
fi

if [ -x /usr/sbin/svccfg ]; then
    /usr/sbin/svccfg delete "$FMRI" 2>/dev/null || true
fi

rm -f "$MANIFEST"
rmdir /var/svc/manifest/ozone 2>/dev/null || true

exit 0
