6 XCOMM @(#) $XConsortium: configRun.src /main/4 1996/10/18 16:25:41 drk $
20 TMPFILE=/tmp/inetd.conf
21 CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
24 XCOMM desired inetd.conf entry:
25 XCOMM cmsd/2-5 dgram rpc/udb wait root /usr/dt/bin/rpc.cmsd rpc.cmsd
28 XCOMM first make an awk script and put it in a file.
31 XCOMM comment out any non-cde cmsd lines
35 '{if ($1 == "cmsd/2-4" && $6 != cmsd)
44 XCOMM remove any cde 2-4 cmsd
48 '{if ($1 == "cmsd/2-4" && $6 == cmsd)
58 XCOMM now run an awk script to see if there is an occurrence of 2-5 cmsd
62 '{if ($6 == cmsd && $1 == "cmsd/2-5")
63 print $0 > "/tmp/cmsd-already-there"
67 XCOMM if it is not there, add it
70 if [ ! -f /tmp/cmsd-already-there ]
72 echo "cmsd/2-5 dgram rpc/udp wait root $CMSD rpc.cmsd" >>$FILE
74 rm /tmp/cmsd-already-there
82 TMPFILE=/tmp/inetd.conf
83 CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
85 HASH first remove the CDE cmsd entry
88 '{if (($1 == "cmsd/2-4" || $1 == "cmsd/2-5") && $6 == cmsd)
97 HASH now uncomment any previously existing 100068 entry
99 awk '{if ($1 == "#cde") {
100 if ($2 == "cmsd/2-4") {
115 XCOMM now check to see if the proper entry is in /etc/rpc
123 HASH if the file doesn't exist (highly unlikely), make one
124 HASH with the proper entry
127 echo "cmsd 100068 dtcalendar" >$RPCFILE
131 HASH check to see if the entry is already there
134 awk '{if ($1 == "cmsd" && $2 == "100068")
135 print $0 > "/tmp/etc-rpc-already-there"
136 }' $RPCFILE >/dev/null
138 if [ ! -f /tmp/etc-rpc-already-there ]
141 HASH if it isn't, check to see if either term already
145 awk '{if ($1 == "cmsd" || $2 == "100068")
146 print $0 > "/tmp/etc-rpc-already-there"
147 }' $RPCFILE >/dev/null
150 HASH if either one does they need to be commented out
153 if [ ! -f /tmp/etc-rpc-already-there ]
155 echo "cmsd 100068 dtcalendar" >>$RPCFILE
157 awk '{if ($1 == "cmsd" || $2 == "100068")
161 }' $RPCFILE >$TMPFILE
163 echo "cmsd 100068 dtcalendar" >>$TMPFILE
165 rm /tmp/etc-rpc-already-there
168 rm /tmp/etc-rpc-already-there
177 TMPFILE="/tmp/etc-rpc"
179 awk '{if ($1 == "cmsd" && $2 == "100068")
187 awk '{if ($1 == "#cde" && ($2 == "cmsd" || $3 == "100068"))
198 if [ -L /sbin/rc3.d/S95xdm ]
200 /bin/cp -f CDE_INSTALLATION_TOP/bin/xlogin /sbin/init.d/xlogin
201 /bin/chown bin:bin /sbin/init.d/xlogin
202 /bin/chmod 750 /sbin/init.d/xlogin
203 /bin/ln -f -s ../init.d/xlogin /sbin/rc3.d/S95xdm
209 if [ -L /sbin/rc3.d/S95xdm ]
211 /bin/ln -f -s ../init.d/xdm /sbin/rc3.d/S95xdm
212 if [ -e /sbin/init.d/xlogin ]
214 /bin/rm -f /sbin/init.d/xlogin
219 CreateAppConfigDirectory()
222 HASH Create the APPCONFIG directory inside DT_CONFIG_TOP and create
223 HASH all of its subdirectories
227 if [ ! -d $APPCONFIG ]
234 for i in $APPCONFIG_DIRS
244 for j in $DT_TOP/$APPCONFIG/$i/STAR
246 if [ ! -d `basename $j` ]
258 if [ -f $DT_TOP/config/dtterm.ti ]
260 /bin/tic $DT_TOP/config/dtterm.ti
261 if [ -f /usr/share/lib/terminfo/d/dtterm ]
263 /bin/chown bin:bin /usr/share/lib/terminfo/d/dtterm
264 /bin/chmod 644 /usr/share/lib/terminfo/d/dtterm
266 echo "Unable to compile $DT_TOP/config/dtterm.ti"
269 echo "Unable to find $DT_TOP/config/dtterm.ti"
284 while [ "$dirname" != "$CDE_TOP" ]
287 rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
288 dirname=${dirname%/STAR}
293 #include "CDE-RUN.list"
298 VerifyInstalledFiles()
300 echo "Status mode owner group filename"
301 echo "-----------------------------------------"
302 XCOMM exists correct correct correct /usr/dt/foo1
303 XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
304 XCOMM exists the link is correct /usr/dt/link
308 #include "../verify.func"
310 #include "CDE-RUN.lst"
314 #include "../option.func"
316 XCOMM ##########################################################################
320 XCOMM ##########################################################################
325 DT_TOP=CDE_INSTALLATION_TOP
326 DT_CONFIG_TOP=CDE_CONFIGURATION_TOP
327 DT_TEMP_TOP=CDE_LOGFILES_TOP
333 APPCONFIG_DIRS="appmanager help icons types"
335 DEFAULT_PRINTER="DtPrint"
339 if [ "$OPERATION" = "configure" ]
343 HASH create the CDE_LOGFILES_TOP directory
346 if [ ! -d $DT_TEMP_TOP/$APPCONFIG/appmanager ]
348 mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager
352 mv $APPCONFIG/appmanager .hidden-appmanager
354 chmod 755 .hidden-appmanager
357 mv .hidden-appmanager $APPCONFIG/appmanager
363 HASH create the CDE_CONFIGURATION_TOP and its config directory
365 if [ ! -d $DT_CONFIG_TOP ]
367 mkdir -p $DT_CONFIG_TOP
369 if [ ! -d $DT_CONFIG_TOP/config ]
371 mkdir -p $DT_CONFIG_TOP/config
374 CreateAppConfigDirectory
377 HASH ConfigurePrintersDir
379 env LANG=C LD_LIBRARY_PATH=$DT_TOP/lib:/usr/shlib:/usr/lib $DT_TOP/bin/dtprintinfo -populate
382 HASH Configure Xsession.d
385 cd $DT_CONFIG_TOP/config
386 if [ ! -d Xsession.d ]
402 elif [ "$OPERATION" = "deconfigure" ]
411 rm -f /usr/share/lib/terminfo/d/dtterm
417 elif [ "$OPERATION" = "verify" ]
424 if [ "$OPERATION" != "verify" ]
427 HASH issue a SIGHUP to the inetd process
429 ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
430 if [ -s /tmp/tmppsout ]
432 awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh