1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/cde/programs
Marcin Cieslak 17a33f0430 Use KORNSHELL variable instead of /bin/ksh
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.
2012-08-23 20:00:43 -06:00
..
backdrops Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dsdm Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
dtaction FreeBSD updates for dtspcd, dtfile and others 2012-08-15 12:41:31 -06:00
dtappbuilder FreeBSD does not need extern char *sys_errlist[] 2012-08-15 15:58:46 -06:00
dtappintegrate Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
dtcalc dtcalc: Resolve "format not a string literal and no format arguments [-Wformat-security]" warnings. 2012-08-22 11:28:36 +01:00
dtcm Find correct system includes and libs on FreeBSD. 2012-08-19 18:08:31 -06:00
dtconfig Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtcreate dtcreate: Replace broken GetBaseName with basename 2012-08-17 19:04:13 -06:00
dtdbcache Remove hardcoded CCLINK's in Imakefiles when linking with C++ built libs (DtSvc). 2012-06-19 16:27:20 -06:00
dtdocbook dtdocbook: on some systems SIGLOST = SIGPWR and they should not be in the same case statement. 2012-08-16 16:19:40 -06:00
dtdspmsg Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
dtexec 64bit: Fix crash in dtexec 2012-08-23 19:56:43 -06:00
dtfile Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
dthello Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
dthelp Simple compiler warning fixes in programs/dthelp. 2012-08-21 21:53:33 -04:00
dticon Remove hardcoded CCLINK's in Imakefiles when linking with C++ built libs (DtSvc). 2012-06-19 16:27:20 -06:00
dtimsstart FreeBSD does not need extern char *sys_errlist[] 2012-08-15 15:58:46 -06:00
dtinfo Get rid of malloc.h. 2012-08-12 14:20:58 -06:00
dtksh Use $(KORNSHELL) for dtksh as well 2012-08-14 20:37:07 -06:00
dtlogin Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
dtmail OpenBSD still uses GNU iconv, so the second argument to iconv(3) is not const. 2012-08-19 18:13:35 -06:00
dtpad Use SIGCHLD rather than SIGCLD. 2012-08-09 12:24:56 -06:00
dtpdm Remove hardcoded CCLINK's in Imakefiles when linking with C++ built libs (DtSvc). 2012-06-19 16:27:20 -06:00
dtpdmd Find correct system includes and libs on FreeBSD. 2012-08-19 18:08:31 -06:00
dtprintegrate Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
dtprintinfo Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
dtscreen Patches for dtscreen, dtsearchpath, dtsession on OBSD. 2012-08-11 20:06:44 -06:00
dtsearchpath FreeBSD updates for dtspcd, dtfile and others 2012-08-15 12:41:31 -06:00
dtsession Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
dtspcd FreeBSD updates for dtspcd, dtfile and others 2012-08-15 12:41:31 -06:00
dtsr SIGPWR is not present everywhere. 2012-08-10 05:44:49 -06:00
dtstyle Remove hardcoded CCLINK's in Imakefiles when linking with C++ built libs (DtSvc). 2012-06-19 16:27:20 -06:00
dtterm Use $(SHELL) and $(KORNSHELL) for shell scripts 2012-08-14 12:34:41 -06:00
dtudcexch Modern BSDs don't need union wait 2012-08-15 15:58:48 -06:00
dtudcfonted Modern BSDs don't need union wait 2012-08-15 15:58:48 -06:00
dtwm dtwm: Cleanup some implicit definitions 2012-08-10 05:54:52 -06:00
fontaliases Provide basic font aliases for FreeBSD 2012-08-16 16:15:52 -06:00
icons Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
localized Fix localized build on OpenBSD. 2012-08-20 19:56:15 -06:00
nsgmls Process sgml and man files in doc directory for FreeBSD. 2012-08-15 15:56:03 -06:00
palettes Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
ttsnoop OpenBSD patches for ttsnoop. 2012-08-11 20:06:44 -06:00
tttypes Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
types Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
util Fix dttypes for BSD systems 2012-08-19 18:12:28 -06:00
Imakefile Build dtksh on OpenBSD. 2012-08-19 18:14:37 -06:00