configMan.src 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. XCOMM! /bin/ksh
  2. XCOMM #######
  3. XCOMM Product: CDE
  4. XCOMM Fileset: CDE-MAN
  5. XCOMM customize
  6. XCOMM @(#) $XConsortium: configMan.src /main/4 1996/04/23 19:33:17 drk $
  7. XCOMM #######
  8. XCOMM
  9. XCOMM (c) Copyright Hewlett-Packard Company, 1993
  10. XCOMM
  11. XCOMM #######
  12. #define STAR *
  13. XCOMM ############################################
  14. RemoveManFiles()
  15. {
  16. while read SRC
  17. do
  18. if [ "$SRC" != "" ]
  19. then
  20. rm -f $SRC
  21. dirname=${SRC%/STAR}
  22. if [ -d $dirname ]
  23. then
  24. cd $dirname
  25. while [ "$dirname" != "$CDE_TOP" ]
  26. do
  27. cd ..
  28. rmdir ${dirname##STAR/} >/dev/null 2>/dev/null
  29. dirname=${dirname%/STAR}
  30. done
  31. fi
  32. fi
  33. done <<-EOF
  34. #include "CDE-MAN.list"
  35. EOF
  36. }
  37. VerifyInstalledFiles()
  38. {
  39. echo "Status mode owner group filename"
  40. echo "-----------------------------------------"
  41. XCOMM exists correct correct correct /usr/dt/foo1
  42. XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2
  43. XCOMM exists the link is correct /usr/dt/link
  44. while read SRC
  45. do
  46. #include "verify.func"
  47. done <<-EOF
  48. #include "CDE-MAN.lst"
  49. EOF
  50. }
  51. #include "option.func"
  52. XCOMM ##########################################################################
  53. XCOMM
  54. XCOMM Main Body
  55. XCOMM
  56. XCOMM ##########################################################################
  57. PRODUCT=CDE
  58. FILESET=CDE-DEMOS
  59. retval=0
  60. CDE_TOP=CDE_INSTALLATION_TOP
  61. CDE_CONF_TOP=CDE_CONFIGURATION_TOP
  62. HandleOption $*
  63. if [ "$OPERATION" = "deconfigure" ]
  64. then
  65. echo "de-Configuring for CDE-MAN..."
  66. RemoveManFiles
  67. VerifyInstalledFiles
  68. elif [ "$OPERATION" = "verify" ]
  69. then
  70. VerifyInstalledFiles
  71. fi
  72. return $retval