File: cryptsetup.postrm

package info (click to toggle)
cryptsetup 2%3A2.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,312 kB
  • sloc: ansic: 65,883; sh: 17,680; cpp: 994; xml: 920; makefile: 495; perl: 486
file content (26 lines) | stat: -rw-r--r-- 606 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh

set -e

case "$1" in
    remove)
	for file in cryptdisks_start cryptdisks_stop; do
		if [ -L /usr/sbin/$file ]; then
			rm /usr/sbin/$file
		fi
	done
    ;;
esac

#DEBHELPER#

# try to remove /etc/init if it exists, it's empty and isn't owned
# NOTE: this needs to placed *after* the dh_installdeb-replaced snippet
# which contains calls to `dpkg-maintscript-helper rm_conffile`
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
    if [ -d /etc/init ] && ! { dpkg-query -S /etc/init >/dev/null 2>&1 || [ $? -ne 1 ]; } then
        rmdir --ignore-fail-on-non-empty /etc/init
    fi
fi

exit 0