From 88cbe518a4f77d562ee97ef9c8fc3a0423bf8108 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Tue, 10 Apr 2018 13:28:55 -0600 Subject: [PATCH] installCDE/linux: don't try to edit/modify /etc/inetd.conf if it does not exist 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 | 9 +++++++-- cde/admin/IntegTools/post_install/linux/configRun.src | 9 +++++++-- cde/admin/IntegTools/post_install/linux/configTT.src | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/cde/admin/IntegTools/post_install/linux/configMin.src b/cde/admin/IntegTools/post_install/linux/configMin.src index dcbb1608..d1d26e04 100755 --- a/cde/admin/IntegTools/post_install/linux/configMin.src +++ b/cde/admin/IntegTools/post_install/linux/configMin.src @@ -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 diff --git a/cde/admin/IntegTools/post_install/linux/configRun.src b/cde/admin/IntegTools/post_install/linux/configRun.src index 688c34cc..444a52bf 100755 --- a/cde/admin/IntegTools/post_install/linux/configRun.src +++ b/cde/admin/IntegTools/post_install/linux/configRun.src @@ -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 \ diff --git a/cde/admin/IntegTools/post_install/linux/configTT.src b/cde/admin/IntegTools/post_install/linux/configTT.src index 1ae27974..d2876c73 100755 --- a/cde/admin/IntegTools/post_install/linux/configTT.src +++ b/cde/admin/IntegTools/post_install/linux/configTT.src @@ -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) ; -- 2.25.1