configMin.src 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. XCOMM! /bin/ksh
  2. XCOMM #######
  3. XCOMM Product: CDE
  4. XCOMM Fileset: CDE-MIN
  5. XCOMM configure
  6. XCOMM @(#) $XConsortium: configMin.src /main/4 1996/04/23 19:33:27 drk $
  7. XCOMM #######
  8. XCOMM
  9. XCOMM (c) Copyright Hewlett-Packard Company, 1993
  10. XCOMM
  11. XCOMM #######
  12. PRODUCT=CDE
  13. FILESET=CDE-MIN
  14. retval=0
  15. XCOMM
  16. XCOMM check for existence of /etc/services
  17. XCOMM
  18. if [ ! -f /etc/services ] # highly unlikely
  19. then
  20. echo "" >/etc/services
  21. fi
  22. XCOMM
  23. XCOMM see if it already exists
  24. XCOMM
  25. awk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
  26. /etc/services >/dev/null
  27. if [ ! -f /tmp/dtspc-already-there ]
  28. then
  29. echo "dtspc\t6112/tcp\t#subprocess control" >>/etc/services
  30. else
  31. rm /tmp/dtspc-already-there
  32. fi
  33. XCOMM
  34. XCOMM remove legacy entries like dtspcd
  35. XCOMM
  36. awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
  37. /etc/services >/tmp/etc-services
  38. mv /tmp/etc-services /etc/services
  39. XCOMM
  40. XCOMM check for existence of /etc/inetd.conf
  41. XCOMM
  42. if [ ! -f /etc/inetd.conf ] # highly unlikely
  43. then
  44. echo "" >/etc/inetd.conf
  45. fi
  46. XCOMM
  47. XCOMM see if it already exists
  48. XCOMM
  49. awk '{if ($1 == "dtspc") print $0 > "/tmp/dtspc-already-there"}' \
  50. /etc/inetd.conf >/dev/null
  51. if [ ! -f /tmp/dtspc-already-there ]
  52. then
  53. echo dtspc stream tcp nowait root CDE_INSTALLATION_TOP/bin/dtspcd CDE_INSTALLATION_TOP/bin/dtspcd >>/etc/inetd.conf
  54. else
  55. rm /tmp/dtspc-already-there
  56. fi
  57. XCOMM
  58. XCOMM remove legacy entries like dtspcd
  59. XCOMM
  60. awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") ; else print $0}' \
  61. /etc/inetd.conf >/tmp/etc-inetd-conf
  62. mv /tmp/etc-inetd-conf /etc/inetd.conf
  63. XCOMM
  64. XCOMM create the /var/dt/tmp directory for the dtspcd
  65. XCOMM
  66. if [ ! -d CDE_LOGFILES_TOP/tmp ]
  67. then
  68. mkdir -p CDE_LOGFILES_TOP/tmp
  69. fi
  70. return $retval