configRun: remove inetd support
[oweals/cde.git] / cde / admin / IntegTools / post_install / linux / configRun.src
index 00c7e89930608dfb993da1876f8b3709606abd5b..02b64e8ca6eb22540b7d695fe1603c6cfaa02dcb 100755 (executable)
@@ -14,101 +14,6 @@ FILESET=CDE-RUN
 DO_CONFIGURATION=""
 retval=0
 
-FixInetdDotConf()
-{
-FILE=/etc/inetd.conf
-TMPFILE=/tmp/inetd.conf
-CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
-
-XCOMM
-XCOMM desired inetd.conf entry:
-XCOMM 100068/2-4 dgram rpc/udp wait root CDE_INSTALLATION_TOP/bin/rpc.cmsd rpc.cmsd
-XCOMM
-
-XCOMM first make an awk script and put it in a file.
-XCOMM
-
-XCOMM comment out any non-cde rpc.cmsd lines
-XCOMM
-
-    nawk -v cmsd=$CMSD \
-       '{if ($1 == "100068/2-4" && $6 != cmsd)
-               print "#cde " $0;
-         else
-               print $0
-        }' $FILE >$TMPFILE
-
-    cp $TMPFILE $FILE
-    rm $TMPFILE
-
-XCOMM remove any cde 2-4 cmsd
-XCOMM
-
-    nawk -v cmsd=$CMSD \
-       '{if ($1 == "100068/2-4" && $6 == cmsd)
-               ;
-         else
-               print $0
-        }' $FILE >$TMPFILE
-
-    cp $TMPFILE $FILE
-    rm $TMPFILE
-
-XCOMM
-XCOMM now run an awk script to see if there is an occurrence of 2-5 cmsd
-XCOMM
-
-    nawk -v cmsd=$CMSD \
-       '{if ($6 == cmsd && $1 == "100068/2-5")
-               print $0 > "/tmp/cmsd-already-there"
-        }' $FILE >/dev/null
-
-XCOMM
-XCOMM if it is not there, add it
-XCOMM
-
-    if [ ! -f /tmp/cmsd-already-there ]
-    then
-        echo "100068/2-5 dgram rpc/udp wait root $CMSD rpc.cmsd" >>$FILE
-    else
-       rm /tmp/cmsd-already-there
-    fi
-
-}
-
-UnfixInetdDotConf()
-{
-FILE=/etc/inetd.conf
-TMPFILE=/tmp/inetd.conf
-CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
-
-    HASH first remove the CDE rpc.cmsd entry
-
-    nawk -v cmsd=$CMSD \
-       '{if (($1 == "100068/2-4" || $1 == "100068/2-5") && $6 == cmsd)
-               ;
-         else
-               print $0
-        }' $FILE >$TMPFILE
-
-    cp $TMPFILE $FILE
-    rm $TMPFILE
-
-    HASH now uncomment any previously existing 100068 entry
-
-    awk '{if ($1 == "#cde") {
-               if ($2 == "100068/2-4") {
-                       $1 = $2;
-                       $2 = ""
-               }
-         }
-         print $0
-        }' $FILE >$TMPFILE
-
-    cp $TMPFILE $FILE
-    rm $TMPFILE
-}
-
 CreateAppConfigDirectory()
 {
   HASH
@@ -214,6 +119,19 @@ XCOMM        exists    the link is correct    /usr/dt/link
        EOF
 }
 
+
+PrintUsage()
+{
+  echo "Usage:" $0 "[OPERATION]"
+  echo ""
+  echo "Operations:"
+  echo "    -e        configure"
+  echo "    -d        deconfigure"
+  echo "    -v        verify"
+  echo "    -s        size"
+  echo "    -h        help"
+}
+
 #include "../option.func"
 
 XCOMM ##########################################################################
@@ -239,6 +157,12 @@ DEFAULT_PRINTER="DtPrint"
 
   HandleOption $*
 
+  if [ "$OPERATION" = "usage" ]
+  then
+    PrintUsage
+    exit 0
+  fi
+
   if [ "$OPERATION" = "configure" ]
   then
 
@@ -279,7 +203,7 @@ DEFAULT_PRINTER="DtPrint"
     HASH
     HASH ConfigurePrintersDir
     HASH
-    env LANG=C /usr/dt/bin/dtprintinfo -populate
+    HASH env LANG=C /usr/dt/bin/dtprintinfo -populate
 
     HASH
     HASH Configure Xsession.d
@@ -294,15 +218,11 @@ DEFAULT_PRINTER="DtPrint"
     cd $DT_CONFIG_TOP
     chmod -R 755 *
 
-    FixInetdDotConf
-
     doDttermTerminfo
 
   elif [ "$OPERATION" = "deconfigure" ]
   then
 
-    UnfixInetdDotConf
-
     RemoveRunFiles
 
     VerifyInstalledFiles
@@ -314,21 +234,5 @@ DEFAULT_PRINTER="DtPrint"
 
   fi
 
-  if [ "$OPERATION" != "verify" ]
-  then
-
-    HASH issue a SIGHUP to the inetd process
-
-    ps -ef | grep inetd | grep -v grep >/tmp/tmppsout
-    if [ -s /tmp/tmppsout ]
-    then
-       awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh
-    else
-       /usr/sbin/inetd -s
-    fi
-  fi
-
-  HASH dtmail requires setgid
-  chmod 2555 $DT_TOP/bin/dtmail
 
   return $retval