dtinfo other files
[oweals/cde.git] / cde / admin / IntegTools / post_install / configMin.src
1 XCOMM! /bin/ksh
2 XCOMM #######
3 XCOMM   Product: CDE
4 XCOMM   Fileset: CDE-MIN
5 XCOMM   configure
6 XCOMM   @(#) $XConsortium: configMin.src /main/4 1996/04/23 19:33:27 drk $
7 XCOMM #######
8 XCOMM 
9 XCOMM  (c) Copyright Hewlett-Packard Company, 1993
10 XCOMM 
11 XCOMM #######
12
13 PRODUCT=CDE
14 FILESET=CDE-MIN
15 retval=0
16
17 XCOMM 
18 XCOMM  check for existence of /etc/services
19 XCOMM 
20
21     if [ ! -f /etc/services ]   # highly unlikely
22     then
23         echo "" >/etc/services
24     fi
25
26 XCOMM 
27 XCOMM  see if it already exists
28 XCOMM 
29
30     awk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
31                 /etc/services >/dev/null
32     if [ ! -f /tmp/dtspc-already-there ]
33     then
34         echo "dtspc\t6112/tcp\t#subprocess control" >>/etc/services
35     else
36         rm /tmp/dtspc-already-there
37     fi
38
39 XCOMM 
40 XCOMM  remove legacy entries like dtspcd
41 XCOMM 
42
43     awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
44                 /etc/services >/tmp/etc-services
45     mv /tmp/etc-services /etc/services
46
47 XCOMM 
48 XCOMM  check for existence of /etc/inetd.conf
49 XCOMM 
50
51     if [ ! -f /etc/inetd.conf ] # highly unlikely
52     then
53         echo "" >/etc/inetd.conf
54     fi
55
56 XCOMM 
57 XCOMM  see if it already exists
58 XCOMM 
59
60     awk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
61         /etc/inetd.conf >/dev/null
62
63     if [ ! -f /tmp/dtspc-already-there ]
64     then
65         echo dtspc stream tcp nowait root CDE_INSTALLATION_TOP/bin/dtspcd CDE_INSTALLATION_TOP/bin/dtspcd >>/etc/inetd.conf
66     else
67         rm /tmp/dtspc-already-there
68     fi
69
70 XCOMM 
71 XCOMM  remove legacy entries like dtspcd
72 XCOMM 
73
74     awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
75                 /etc/inetd.conf >/tmp/etc-inetd-conf
76     mv /tmp/etc-inetd-conf /etc/inetd.conf
77
78 XCOMM 
79 XCOMM   create the /var/dt/tmp directory for the dtspcd
80 XCOMM 
81
82     if [ ! -d CDE_LOGFILES_TOP/tmp ]
83     then
84         mkdir -p CDE_LOGFILES_TOP/tmp
85     fi
86
87     return $retval