#! /bin/sh # prerm script for root-rootd # # see: dh_installdeb(1) # Do not set - If we cannot remove the rootd user, it is OK set -e case "$1" in remove) if grep ^rootd /etc/inetd.conf > /dev/null 2>&1 ; then update-inetd --remove rootd fi # Remove the rootd user and group # Taken from mysql-server package and modified for ROOT # rm -rf /var/spool/rootd if getent passwd rootd > /dev/null; then deluser --remove-home rootd reason=$? if [ $reason -ne 0 ] ; then # Could not remove user. Ignore. echo "Couldn't remove user rootd, check it. Reason" case $reason in 1) echo "can't update password file" ;; 2) echo "bad command syntax" ;; 6) echo "specified user doesn't exist" ;; 8) echo "user currently logged in" ;; 10) echo "can't update group file" ;; 12) echo "can't remove home directory" ;; *) echo "Unrecognized exit code $reason" ;; esac fi fi ;; upgrade|deconfigure) # Nothing to be done here ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 0 ;; esac # Now we set fail-on-sub-error so that the debhelper stuff is done correctly. # set -e # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0