File: pkgadd

package info (click to toggle)
fai 2.8.4sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,284 kB
  • ctags: 176
  • sloc: sh: 3,362; perl: 1,591; makefile: 142
file content (43 lines) | stat: -rwxr-xr-x 784 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
42
43
#! /sbin/sh

#    Thomas Lange
#    Institut fuer Informatik
#    Universitaet zu Koeln
#    Pohligstr. 1
#    D-50969 Koeln
#
#    lange@informatik.uni-koeln.de
#
#    Copyright (c) 1997 by Thomas Lange

args=$*

while [ "$*" != "" ]; do
    case "$1" in 
      -d)
          dir=$2; shift;
          ;;
    esac
    name=$1
    shift
done

# if dataless == 1 and
# If base equal usr or opt don't install it
# If type equal usr or kvm don't install it

PKG=0 ; BASE=0
egrep "SUNW_PKGTYPE=(usr|kvm)" $dir/$name/pkginfo >/dev/null && PKG=1
egrep "BASEDIR=/(usr|opt)" $dir/$name/pkginfo >/dev/null && BASE=1

if [ -f /tmp/.dataless ]
then
   if [ $PKG -eq 1 -o $BASE -eq 1 ]
   then
	echo "not installing $name"
	exit 0
   fi
fi

echo "installing $name"
exec /usr/sbin/pkgadd.bin $args