#! /bin/sh #---------------------------------------------------------------------------- # /var/install/deinstall/libldap2 - libldap deinstallation # # Copyright (c) 2005-2008 Jens Vehlhaber # Copyright (c) 2009-2023 The Eisfair Team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # set package name module_name=libldap2 # set filelist filelist=/etc/filelist.d/${module_name}-files.txt # check for update is given if [ "${1}" = "--update" ] then update=true fi # --------------------------------------------------------------------------- # remove program files # --------------------------------------------------------------------------- while read id perm user group package file do case ${id} in b|u) # remove program files if [ "${file}" != "tmp/install.sh" \ -a "${file}" != "tmp/preinstall.sh" ] then rm -f /${file} fi ;; f) # remove directories rmdir --ignore-fail-on-non-empty /${file} 2>/dev/null ;; esac done < ${filelist} # --------------------------------------------------------------------------- # stop remove for update only # --------------------------------------------------------------------------- if ${update:-false} then exit 0 fi deinstall_file=/var/install/deinstall/${module_name}-dev if [ -f ${deinstall_file} ] then /usr/bin/eisman uninstall --update --auto --quiet ${module_name}-dev fi # --------------------------------------------------------------------------- # end # --------------------------------------------------------------------------- exit 0