#!/bin/sh #---------------------------------------------------------------------------- # /var/install/deinstall/libldap2-dev - deinstallation # # Copyright (c) 2005-2008 Jens Vehlhaber # Copyright (c) 2009-2023 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2005-08-14 jv # Last Update: $Id$ # # 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. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib module_name='libldap2-dev' package_filelist=/etc/filelist.d/${module_name}-files.txt if [ "$1" = 'update' ] then update=1 else update=0 fi ### ------------------------------------------------------------------------- ### remove program files ### ------------------------------------------------------------------------- if [ -f "${package_filelist}" ] then while read line do #check if comment echo "${line}" | grep -q "^#" if [ $? -ne 0 ] then # no comment - go on ... delflag=1 ftype=`echo "${line}" | cut -d' ' -f1` fname=`echo "${line}" | cut -d' ' -f6` case ${ftype} in b|u) # remove program files if [ "${fname}" = "tmp/install.sh"\ -o "${fname}" = "tmp/preinstall.sh"\ -o "${fname}" = "var/install/deinstall/${module_name}" ] then delflag=0 fi if [ ${delflag} -eq 1 ] then rm -f /${fname} fi ;; f) # remove directories rmdir --ignore-fail-on-non-empty /${fname} ;; esac fi done < ${package_filelist} # remove file list rm -f ${package_filelist} fi # remove additional files rm -f /usr/lib/liblber.so rm -f /usr/lib/libldap.so rm -f /usr/lib/libldap_r.so # remove deinstall script rm -f /var/install/deinstall/${module_name} ### ------------------------------------------------------------------------- ### end ### ------------------------------------------------------------------------- exit 0