6 XCOMM @(#) $XConsortium: configMin.src /main/2 1996/04/21 19:13:28 drk $
9 XCOMM (c) Copyright Hewlett-Packard Company, 1993
18 CheckForClobberedLinks()
21 XCOMM ensure links not clobbered
24 for file in services inetd.conf
26 if test ! -L /etc/$file
27 then if test -f /etc/$file
30 ln -s /etc/inet/$file /etc/$file
38 SERVICES=/etc/inet/services
41 XCOMM see if it already exists
44 nawk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
46 if [ ! -f /tmp/dtspc-already-there ]
48 if test ! -f ${SERVICES}.preCDE
49 then mv $SERVICES $SERVICES.preCDE
50 cp ${SERVICES}.preCDE $SERVICES
53 echo "dtspc\t6112/tcp\t#subprocess control" >>$SERVICES
55 rm /tmp/dtspc-already-there
59 XCOMM remove legacy entries like dtspcd
62 nawk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
63 $SERVICES >/tmp/etc-services
64 mv /tmp/etc-services $SERVICES
68 UnfixEtcInetServices()
70 SERVICES=/etc/inet/services
71 TMPFILE=/tmp/etc-services
73 nawk '{if ($1 == "dtspc" && $2 == "6112/tcp")
77 }' $SERVICES >$TMPFILE
84 INETD_CONF=/etc/inet/inetd.conf
87 XCOMM see if it already exists
90 nawk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
91 $INETD_CONF >/dev/null
93 if [ ! -f /tmp/dtspc-already-there ]
95 if test ! -f ${INETD_CONF}.preCDE
96 then mv $INETD_CONF $INETD_CONF.preCDE
97 cp ${INETD_CONF}.preCDE $INETD_CONF
100 DTSPCD=CDE_INSTALLATION_TOP/bin/dtspcd
101 echo "dtspc stream tcp nowait root $DTSPCD $DTSPCD" >>$INETD_CONF
103 rm /tmp/dtspc-already-there
107 XCOMM remove legacy entries like dtspcd
110 nawk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
111 $INETD_CONF >/tmp/etc-inetd-conf
112 mv /tmp/etc-inetd-conf $INETD_CONF
113 chmod 444 $INETD_CONF
118 INETD_CONF=/etc/inet/inetd.conf
119 TMPFILE=/tmp/inetd.conf
121 nawk '{if ($1 == "dtspc")
125 }' $INETD_CONF >$TMPFILE
127 mv $TMPFILE $INETD_CONF
132 XCOMM issue a SIGHUP to the inetd process
134 ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
135 if [ -s /tmp/tmppsout ]
137 nawk '{print "kill -HUP " $2}' /tmp/tmppsout | /bin/ksh
144 VerifyInstalledFiles()
146 echo "Status mode owner group filename"
147 echo "-----------------------------------------"
148 XCOMM exists correct correct correct /usr/dt/foo1
149 XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
150 XCOMM exists the link is correct /usr/dt/link
154 #include "../verify.func"
156 #include "CDE-MIN.lst"
160 #include "../option.func"
162 XCOMM ####################################################################
166 XCOMM ####################################################################
168 CheckForClobberedLinks
172 if [ "$OPERATION" = "configure" ]
179 elif [ "$OPERATION" = "deconfigure" ]
189 elif [ "$OPERATION" = "verify" ]