Use POSIX macros for linux
[oweals/cde.git] / cde / programs / dtlogin / config / Xstartup.src
1 XCOMM! KORNSHELL
2 XCOMM ##########################################################################
3 XCOMM
4 XCOMM  Xstartup
5 XCOMM
6 XCOMM  Common Desktop Environment (CDE)
7 XCOMM
8 XCOMM  Configuration file for the Login Manager
9 XCOMM
10 XCOMM  (c) Copyright 1993, 1994 Hewlett-Packard Company
11 XCOMM  (c) Copyright 1993, 1994 International Business Machines Corp.
12 XCOMM  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
13 XCOMM  (c) Copyright 1993, 1994 Novell, Inc.
14 XCOMM
15 XCOMM      ************** DO NOT EDIT THIS FILE **************
16 XCOMM
17 XCOMM  CDE_INSTALLATION_TOP/config/Xstartup is a factory-default file and will
18 XCOMM  be unconditionally overwritten upon subsequent installation.
19 XCOMM  Before making changes to the file, copy it to the configuration 
20 XCOMM  directory, CDE_CONFIGURATION_TOP/config. You must also update the startup
21 XCOMM  resource in CDE_CONFIGURATION_TOP/config/Xconfig.
22 XCOMM
23 XCOMM  $XConsortium: Xstartup.src /main/6 1996/08/15 16:52:10 rswiston $
24 XCOMM
25 XCOMM  This file is typically a shell script. It is run as "root" and should be
26 XCOMM  very careful about security. This is the place to put commands that
27 XCOMM  display the message of the day or do other system-level functions on
28 XCOMM  behalf of the user. The following are the environment variables set for 
29 XCOMM  use in the script:
30 XCOMM
31 XCOMM    DISPLAY, HOME, PATH, USER, SHELL, TZ (timeZone)
32 XCOMM
33 XCOMM  System Administrators are encouraged to use this file as a base to run 
34 XCOMM  system-wide initialization commands with good security.
35 XCOMM
36 XCOMM ##########################################################################
37
38
39 XCOMM
40 XCOMM This script is run as root after the user is verified...
41 XCOMM
42
43 XCOMM dtdbcache file's directory should match
44 XCOMM _DTDTSMMTEMPDIR in DtSvc/DtUtil1/DtsMM.h
45 DTDBFILE=/tmp/dtdbcache_$DISPLAY
46 if [ -f $DTDBFILE ]
47 then
48   /bin/rm -f $DTDBFILE
49 fi
50
51
52 if [ "$DTXSERVERLOCATION" = "local" ]
53 then
54   if [[ ! -z "$ITE" && "$ITE" != "??" && -a "/dev/$ITE" ]]
55   then
56 #if defined (__OpenBSD__)
57         /sbin/chown $USER /dev/$ITE
58         /bin/chgrp $USER_GID /dev/$ITE
59 #elif defined (__FreeBSD__) || defined(__NetBSD__)
60         /usr/sbin/chown $USER /dev/$ITE
61         /usr/bin/chgrp $USER_GID /dev/$ITE
62 #else
63         /bin/chown $USER /dev/$ITE
64         /bin/chgrp $USER_GID  /dev/$ITE
65 #endif
66   fi
67 fi
68
69
70