This patch removes instances of hardcoded
invocation of /bin/ksh and allows to
replace it with, for, example,
/usr/local/bin/ksh93
Also "ksh93" is accepted whenever "ksh" is.
Tested using the following /bin/ksh:
----8<----
WHAT=`ps -o command= -p $PPID`
msg="Something tried to call /bin/ksh: $PPID: $WHAT"
print -u2 "$msg"
logger user.warn "$msg"
exit 99
----8<----
(Warning: first two lines are FreeBSD specific)
Scripts from Makefiles should now be executed either
with
$(KORNSHELL) korn-shell-script
or
$(SHELL) bourne-shell-script
therefore #!/bin/ksh has not been changed everywhere.
/usr/dt/bin/ scripts have been converted (e.g. Xsession)
Whenever possible Imake and CPP facilities have been used.
For C and C++ programs KORNSHELL needs to be defined to
"/path/to/your/ksh" (with quotes) so that it can make
a valid C constant.
Therefore, when adding KORNSHELL to Imakefile for C files,
you have to add
CXXEXTRA_DEFINES = -DKORNSHELL=\"$(KORNSHELL)\"
or similar (for example, see programs/dtprintinfo)
But for simple shell script substitution we usually change
LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)
to:
LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
-DKORNSHELL=$(KORNSHELL) \
-DXPROJECTROOT=X11ProjectRoot
since we don't want quotes for shell scripts.
81 lines
2.4 KiB
Plaintext
81 lines
2.4 KiB
Plaintext
XCOMM! KORNSHELL
|
|
XCOMM ##########################################################################
|
|
XCOMM
|
|
XCOMM Xreset
|
|
XCOMM
|
|
XCOMM Common Desktop Environment (CDE)
|
|
XCOMM
|
|
XCOMM Configuration file for the Login Manager
|
|
XCOMM
|
|
XCOMM (c) Copyright 1993, 1994 Hewlett-Packard Company
|
|
XCOMM (c) Copyright 1993, 1994 International Business Machines Corp.
|
|
XCOMM (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
|
XCOMM (c) Copyright 1993, 1994 Novell, Inc.
|
|
XCOMM
|
|
XCOMM ************** DO NOT EDIT THIS FILE **************
|
|
XCOMM
|
|
XCOMM CDE_INSTALLATION_TOP/config/Xreset is a factory-default file and will
|
|
XCOMM be unconditionally overwritten upon subsequent installation.
|
|
XCOMM Before making changes to the file, copy it to the configuration
|
|
XCOMM directory, CDE_CONFIGURATION_TOP/config. You must also update the reset
|
|
XCOMM resource in CDE_CONFIGURATION_TOP/config/Xconfig.
|
|
XCOMM
|
|
XCOMM $XConsortium: Xreset.src /main/6 1996/08/15 16:51:53 rswiston $
|
|
XCOMM
|
|
XCOMM
|
|
XCOMM This file is symmetrical with Xstartup. This script is run after the user
|
|
XCOMM session is terminated. Run as root, it should probably contain commands
|
|
XCOMM that undo the effects of commands in Xstartup, such as unmounting directories
|
|
XCOMM from file servers. The collection of environment variables that were passed
|
|
XCOMM to Xstartup are also passed to Xreset.
|
|
XCOMM
|
|
XCOMM ##########################################################################
|
|
|
|
XCOMM
|
|
XCOMM This script is run as root after the session terminates but
|
|
XCOMM before the display is closed...
|
|
XCOMM
|
|
|
|
XCOMM
|
|
XCOMM Update action types for any printers created during the session
|
|
XCOMM
|
|
|
|
if [ -x /usr/dt/bin/dtprintinfo ]
|
|
then
|
|
/usr/dt/bin/dtprintinfo -populate
|
|
fi
|
|
|
|
XCOMM
|
|
XCOMM Reset console ownership if local session
|
|
XCOMM
|
|
|
|
if [ "$DTXSERVERLOCATION" = "local" ]
|
|
then
|
|
if [[ ! -z "$ITE" && "$ITE" != "??" && -a "/dev/$ITE" ]]
|
|
then
|
|
chown root /dev/$ITE
|
|
chgrp $ROOT_GID /dev/$ITE
|
|
fi
|
|
fi
|
|
|
|
XCOMM
|
|
XCOMM If Xsession did not exit gracefully for this user, the dtdbcache
|
|
XCOMM file will still be left around. Remove it if this user owns it.
|
|
XCOMM
|
|
|
|
XCOMM dtdbcache file's directory should match
|
|
XCOMM _DTDTSMMTEMPDIR in DtSvc/DtUtil1/DtsMM.h
|
|
#ifdef __osf__
|
|
DTDBFILE=/var/tmp/dtdbcache_$DISPLAY
|
|
#else
|
|
DTDBFILE=/tmp/dtdbcache_$DISPLAY
|
|
#endif
|
|
if [ -f $DTDBFILE ]
|
|
then
|
|
DTDBFILEOWNER=`/bin/ls -l $DTDBFILE | /bin/awk '{print $3}'`
|
|
if [ $USER = $DTDBFILEOWNER ]
|
|
then
|
|
/bin/rm -f $DTDBFILE
|
|
fi
|
|
fi
|