6 XCOMM @(#) $TOG: configRun.src /main/1 1998/03/11 16:18:24 mgreess $
20 TMPFILE=/tmp/inetd.conf
21 CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
24 XCOMM desired inetd.conf entry:
25 XCOMM cmsd/2-4 dgram rpc/udp4 wait root CDE_INSTALLATION_TOP/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 rpc.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/udp4 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 rpc.cmsd entry
88 '{if (($1 == "cmsd/2-4" || $1 == "cmsd/2-5") && $6 == cmsd)
97 HASH now uncomment any previously existing cmsd entry
99 awk '{if ($1 == "#cde") {
100 if ($2 == "cmsd/2-4") {
112 CreateAppConfigDirectory()
115 HASH Create the APPCONFIG directory inside DT_CONFIG_TOP and create
116 HASH all of its subdirectories
120 if [ ! -d $APPCONFIG ]
127 for i in $APPCONFIG_DIRS
137 for j in $DT_TOP/$APPCONFIG/$i/STAR
139 if [ ! -d `basename $j` ]
151 if [ -f $DT_TOP/config/dtterm.ti ]
153 tic $DT_TOP/config/dtterm.ti
155 echo "Unable to find $DT_TOP/config/dtterm.ti"
170 while [ "$dirname" != "$CDE_TOP" ]
173 rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
174 dirname=${dirname%/STAR}
179 #include "CDE-RUN.list"
184 VerifyInstalledFiles()
186 echo "Status mode owner group filename"
187 echo "-----------------------------------------"
188 XCOMM exists correct correct correct /usr/dt/foo1
189 XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
190 XCOMM exists the link is correct /usr/dt/link
194 #include "../verify.func"
196 #include "CDE-RUN.lst"
203 echo "Usage:" $0 "[OPERATION]"
207 echo " -d deconfigure"
213 #include "../option.func"
215 XCOMM ##########################################################################
219 XCOMM ##########################################################################
224 DT_TOP=CDE_INSTALLATION_TOP
225 DT_CONFIG_TOP=CDE_CONFIGURATION_TOP
226 DT_TEMP_TOP=CDE_LOGFILES_TOP
232 APPCONFIG_DIRS="appmanager help icons types"
234 DEFAULT_PRINTER="DtPrint"
238 if [ "$OPERATION" = "usage" ]
244 if [ "$OPERATION" = "configure" ]
248 HASH create the CDE_LOGFILES_TOP directory
251 if [ ! -d $DT_TEMP_TOP/$APPCONFIG/appmanager ]
253 mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager
257 mv $APPCONFIG/appmanager .hidden-appmanager
259 chmod 755 .hidden-appmanager
262 mv .hidden-appmanager $APPCONFIG/appmanager
268 HASH create the CDE_CONFIGURATION_TOP and its config directory
270 if [ ! -d $DT_CONFIG_TOP ]
272 mkdir -p $DT_CONFIG_TOP
274 if [ ! -d $DT_CONFIG_TOP/config ]
276 mkdir -p $DT_CONFIG_TOP/config
279 CreateAppConfigDirectory
282 HASH ConfigurePrintersDir
284 HASH env LANG=C /usr/dt/bin/dtprintinfo -populate
287 HASH Configure Xsession.d
290 cd $DT_CONFIG_TOP/config
291 if [ ! -d Xsession.d ]
301 elif [ "$OPERATION" = "deconfigure" ]
310 elif [ "$OPERATION" = "verify" ]
317 if [ "$OPERATION" != "verify" ]
320 HASH issue a SIGHUP to the inetd process
322 /etc/rc.d/inetd onereload
325 HASH dtmail requires setgid
326 chmod 2555 $DT_TOP/bin/dtmail