Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtconfig / hp / dtrc.graph_conf.src
1 XCOMM!/sbin/sh
2 XCOMM $XConsortium: dtrc.graph_conf.src /main/1 1996/07/24 11:42:43 drk $
3 XCOMM
4 XCOMM This version of the CDE dtconfig script is for use in the HP-UX
5 XCOMM operating environment.
6 XCOMM
7 XCOMM  Common Desktop Environment
8 XCOMM
9 XCOMM  (c) Copyright 1996 Digital Equipment Corporation.
10 XCOMM  (c) Copyright 1993-1994,1996 Hewlett-Packard Company.
11 XCOMM  (c) Copyright 1993-1994,1996 International Business Machines Corp.
12 XCOMM  (c) Copyright 1993-1994,1996 Sun Microsystems, Inc.
13 XCOMM  (c) Copyright 1993-1994,1996 Novell, Inc. 
14 XCOMM  (c) Copyright 1996 FUJITSU LIMITED.
15 XCOMM  (c) Copyright 1996 Hitachi.
16 XCOMM
17 XCOMM This script:
18 XCOMM   - copies CDE_INSTALLATION_TOP/config/Xservers to
19 XCOMM           CDE_CONFIGURATION_TOP/config if it does not yet exist,
20 XCOMM   - uses ioscan to find out if the system has a graphics card
21 XCOMM           installed,
22 XCOMM   - comments out the "Local" entry in the Xservers file if it
23 XCOMM           does not,
24 XCOMM
25 XCOMM Location: CDE_INSTALLATION_TOP/config/dtrc.d/20_graph_conf
26
27 PATH=/sbin:/usr/sbin:/usr/bin:/usr/dt/bin
28 export PATH
29
30 XCOMM
31 XCOMM create CDE_CONFIGURATION_TOP/config/Xservers if it does not exist
32
33 if [ ! -f CDE_CONFIGURATION_TOP/config/Xservers ]; then
34     cp CDE_INSTALLATION_TOP/config/Xservers \
35         CDE_CONFIGURATION_TOP/config/Xservers
36 fi
37
38 XCOMM
39 XCOMM comment out the Local entry if there is no graphics card
40
41 if [[ -z `ioscan -kC graphics` ]]; then
42     TAB="       "
43     TS="[${TAB} ]"
44     sed -e "s:^${TS}*\*${TS}${TS}*Local:#  *    Local:" \
45         < CDE_CONFIGURATION_TOP/config/Xservers \
46         > /tmp/Xservers.tmp
47     cp /tmp/Xservers.tmp CDE_CONFIGURATION_TOP/config/Xservers
48     rm -f  /tmp/Xservers.tmp
49 fi
50
51 XCOMM ##################             eof         #####################