File: postinst

package info (click to toggle)
dvbtune 0.5.ds-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 364 kB
  • ctags: 398
  • sloc: ansic: 2,114; sh: 82; makefile: 48
file content (31 lines) | stat: -rw-r--r-- 643 bytes parent folder | download | duplicates (4)
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
27
28
29
30
31
#!/bin/sh

set -e

# 
# Rely on makedev to Do The Right Thing and not stomp on devfsd, udeb
# 
if [ -e /sbin/MAKEDEV ]
then
	( cd /dev && MAKEDEV dvb )
fi

# Delete erroneous /dvb that may have been created due to #330373
if [ -e /dvb ] ; then
	set +e
	echo -n "Incorrect directory /dvb found; attempting to delete it ..."
	# Try Hard.
	find /dvb -type c -exec rm {} 2> /dev/null \;
	find /dvb -type d -exec rmdir {} 2> /dev/null \;
	rm -rf /dvb 2> /dev/null 
	set -e
	if [ -e /dvb ]; then
		echo ""
	 	echo "/dvb could not be deleted. User files may be present."
		echo "Please delete /dvb by hand."
	else
		echo " done."
	fi
fi

#DEBHELPER#