File: postinst

package info (click to toggle)
mirror 2.9-13slink15
  • links: PTS
  • area: main
  • in suites: slink
  • size: 588 kB
  • ctags: 303
  • sloc: perl: 5,881; makefile: 131; sh: 56
file content (41 lines) | stat: -rw-r--r-- 966 bytes parent folder | download
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
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
#
# This is the postinst script for the Debian GNU/Linux mirror package
#
# Written by Dirk Eddelbuettel <edd@debian.org>   

set -e 

patchdir=/usr/doc/mirror/applied-patches

case "$1" in
    configure)
	#
	#
	# We have to patch mirror as Lee has disappeared from the face of the 
	# earth; see /usr/share/doc/mirror/{applied-patches,mkls-lR} about the code
	echo  "** Patching mirror files, see /usr/doc/mirror/README.Debian.gz. **"
 	cd /usr/lib/mirror/
 	cat $patchdir/patch-2 | patch -p0 -l --no-backup-if-mismatch
	cat $patchdir/patch-3 | patch -p0
	#
	# mirror-master(8) doesn't like it if there is no mm.status file, 
	# but we don't want to overwrite an existing one
	if [ ! -f /var/log/mirror/mm.status ]
	then
	    touch /var/log/mirror/mm.status
	    chgrp adm /var/log/mirror/mm.status
	fi
	#

	;;
    abort-upgrade|abort-remove|abort-deconfigure)
	exit 0
	;;
    *)
	echo "postinst called with unknown argument \`$1'" >&2
	exit 0
	;;
esac