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.
77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
XCOMM!KORNSHELL
|
|
XCOMM $XConsortium: Xsetup.src /main/8 1996/07/02 11:40:32 mgreess $
|
|
XCOMM ##########################################################################
|
|
XCOMM
|
|
XCOMM Common Desktop Environment
|
|
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/Xsetup 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 setup
|
|
XCOMM resource in CDE_CONFIGURATION_TOP/config/Xconfig.
|
|
XCOMM
|
|
XCOMM ##########################################################################
|
|
#if defined (_AIX)
|
|
XCOMM
|
|
XCOMM List of displays and keyboard languages
|
|
XCOMM
|
|
XCOMM This list is used to determine the keyboard language mapping for a
|
|
XCOMM particular X station. Each item in the list is a display name
|
|
XCOMM followed by a locale name to use for that display's keyboard
|
|
XCOMM language mapping. To add a new mapping, simply add a new item to
|
|
XCOMM the list. For example, if you have displays named chili:0, carp:0
|
|
XCOMM and pecos:0 with japanese, french and german keyboards, respectively,
|
|
XCOMM your KBD_MAP list would be:
|
|
XCOMM
|
|
XCOMM KBD_MAP[0]="chili:0 Ja_JP"
|
|
XCOMM KBD_MAP[1]="carp:0 Fr_FR"
|
|
XCOMM KBD_MAP[2]="pecos:0 Gr_GR"
|
|
XCOMM
|
|
XCOMM
|
|
KBD_MAP[0]=""
|
|
|
|
#endif
|
|
XCOMM ##########################################################################
|
|
XCOMM
|
|
XCOMM Directory specifications
|
|
XCOMM
|
|
XCOMM ##########################################################################
|
|
|
|
#if defined (_AIX) && defined (AIXV4)
|
|
XCOMM
|
|
XCOMM Wait for boot sequence to end (if booting)
|
|
XCOMM
|
|
if [ "$LOCATION" != "remote" ]; then
|
|
/usr/sbin/rc.bootx
|
|
fi
|
|
#endif
|
|
|
|
|
|
#ifdef sun
|
|
XDIR=/usr/openwin/bin
|
|
#elif defined(CSRG_BASED) || defined(linux)
|
|
XDIR=/usr/bin
|
|
#else
|
|
XDIR=/usr/bin/X11
|
|
#endif
|
|
|
|
#define cpp_Xsetup
|
|
#include "_common.ksh.src"
|
|
#undef cpp_Xsetup
|
|
|
|
#ifdef sun
|
|
if [ ! -f /etc/pam.conf ]; then
|
|
if [ -f /usr/dt/config/sys.pam.conf ]; then
|
|
/bin/cp /usr/dt/config/sys.pam.conf /etc/pam.conf
|
|
/bin/chmod 644 /etc/pam.conf
|
|
fi
|
|
fi
|
|
#endif
|