File: pre_install

package info (click to toggle)
squid 2.6.5-6etch5
  • links: PTS
  • area: main
  • in suites: etch
  • size: 12,540 kB
  • ctags: 13,801
  • sloc: ansic: 105,278; sh: 6,083; makefile: 1,297; perl: 1,245; awk: 40
file content (29 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (25)
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
#!/bin/sh

PATH=

PKG="$1"
DST="$2"

PKGNAME=`/usr/bin/basename $1`

USAGE="Usage: $PKGNAME.pre_install package_path [install_path]"

trap 'echo "FAILED (interrupted by signal)"; exit 1' 1 2 3 4 15

BEGINDATE=`/bin/date`
#FDATE=`echo $BEGINDATE | /bin/awk '{print $2 "_" $3 "_" $7 "_" $4}'`
echo
echo $PKGNAME pre-installation script starts at $BEGINDATE

failed()
{
	# show failed message and exit
	echo "FAILED ($*)"
	exit 1
}

echo

#	check if caller runs as super user:
[ `/usr/ucb/whoami` = root ] || failed "must be super user"