--- /dev/null
+#!/bin/sh
+
+LOGFILE=`mktemp /tmp/amanda-server-rm-log.XXXXXXXXXXX`
+if [ $? -ne 0 ]; then
+ echo "Unable to create log file!"
+ exit 1
+fi
+amanda_user=amandabackup
+amanda_group=disk
+AMANDAHOMEDIR=%%AMANDAHOMEDIR%%
+os=SunOS
+dist=%%DISTRO%%
+
+LOGDIR=%%LOGDIR%%
+REMOVE_LOG="/tmp/amanda-remove.log"
+SYSCONFDIR=/etc
+
+# ---------- Common functions ------------
+# see packaging/common/ in the source tree
+%%COMMON_FUNCTIONS%%
+%%POST_RM_FUNCTIONS%%
+
+# -------- End Common functions ----------
+
+rel=`uname -r`
+
+case $rel in
+ 5.8|5.9)
+ if check_inetd "amanda"; then
+ rm_inetd "amanda" || { \
+ logger "Warning: Did not successfully remove $net_svc_name from SMF.";
+ exit 1; }
+ reload_inetd
+ fi
+ ;;
+ 5.10)
+ if check_smf "amanda"; then
+ rm_smf "amanda" || { \
+ logger "Warning: Did not successfully remove $net_svc_name from SMF.";
+ exit 1; }
+ fi
+ ;;
+esac
+
+logger "Amanda Server removed."
+
+cat $LOGFILE >> $REMOVE_LOG
+rm $LOGFILE