installCDE/linux: don't try to edit/modify /etc/inetd.conf if it does not exist
authorJon Trulson <jon@radscan.com>
Tue, 10 Apr 2018 19:28:55 +0000 (13:28 -0600)
committerJon Trulson <jon@radscan.com>
Tue, 10 Apr 2018 19:44:29 +0000 (13:44 -0600)
Modern systems use xinetd anyway, so this code just creates useless
junk and error messages on installation.

cde/admin/IntegTools/post_install/linux/configMin.src
cde/admin/IntegTools/post_install/linux/configRun.src
cde/admin/IntegTools/post_install/linux/configTT.src

index dcbb1608babc1b2b58411aedf06a4f08a3eb1880..d1d26e04dfdabb6f58041b81fb8f246191d26bc1 100755 (executable)
@@ -79,9 +79,9 @@ XCOMM
 XCOMM check for existence of /etc/inetd.conf
 XCOMM
 
-    if [ ! -f $FILE ]  # highly unlikely
+    if [ ! -f $FILE ]  # highly unlikely (in the 1990s, quite likely in 2018)
     then
-       echo "" >$FILE
+       return
     fi
 
 XCOMM
@@ -120,6 +120,11 @@ UnfixEtcInetdDotConf()
 FILE=/etc/inetd.conf
 TMPFILE=/tmp/inetd.conf
 
+    if [ ! -f $FILE ]  # highly unlikely (in the 1990s, quite likely in 2018)
+    then
+       return
+    fi
+
     awk '{if ($1 == "dtspc")
                ;
          else
index 688c34cc611db10bcd869cf7cbd34d95b95d0f1c..444a52bfd69a313cdff5c17af868b4a131afa94d 100755 (executable)
@@ -24,9 +24,9 @@ XCOMM
 XCOMM check for existence of /etc/inetd.conf
 XCOMM
 
-    if [ ! -f $FILE ]  # highly unlikely
+    if [ ! -f $FILE ]  # highly unlikely (in the 1990s, quite likely in 2018)
     then
-       echo "" >$FILE
+       return
     fi
 
 XCOMM
@@ -91,6 +91,11 @@ FILE=/etc/inetd.conf
 TMPFILE=/tmp/inetd.conf
 CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd
 
+    if [ ! -f $FILE ]  # highly unlikely (in the 1990s, quite likely in 2018)
+    then
+       return
+    fi
+
     HASH first remove the CDE rpc.cmsd entry
 
     awk -v cmsd=$CMSD \
index 1ae2797401c5b4d0b3163fa1d767947eb8e6d535..d2876c73f8c8f49810e7298988d89ac4a56339f0 100755 (executable)
@@ -26,9 +26,9 @@ XCOMM
 XCOMM check for existence of /etc/inetd.conf
 XCOMM
 
-    if [ ! -f $FILE ]  # highly unlikely
+    if [ ! -f $FILE ]  # highly unlikely (in the 1990s, quite likely in 2018)
     then
-       echo "" >$FILE
+       return
     fi
 
 XCOMM
@@ -64,6 +64,11 @@ FILE=/etc/inetd.conf
 TMPFILE=/tmp/inetd.conf
 TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver
 
+    if [ ! -f $FILE ]  # highly unlikely (in the 1990s, quite likely in 2018)
+    then
+       return
+    fi
+
     awk -v ttdb=$TTDBSERVERD \
        '{if ($1 == "100083/1" && $6 == ttdb)
                ;