Problem
OpenServer specific rc scripts in OKP are not executed by the UnixWare S99okprc script.
Cause
There is a bug in the /etc/rc2.d/S99okrpc script that results in the script failing to detect the existence of OpenServer rc files in /openserver/etc/rc*.d.
Solution
The S99okprc script needs to be modified. The following
if...fi statements are added to the script.In the start section prior to the test for the existence of /openserver/$target add the following text:
if [ "`echo $target | cut -c -11`" = "/openserver" ]
then
target="`echo $target | cut -c 12-`"
fiIn the stop section prior to the test for the existence of /openserver/$target add the following text:
if [ "`echo $target | cut -c -11`" = "/openserver" ]
then
target="`echo $target | cut -c 12-`"
fiA modifed copy of the entire script is included below:
<--- CUT HERE --->
#!/bin/sh
#
# Copyright (c) 2002 SCO, Inc. All Rights Reserved.
#
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
# SCO INTERNATIONAL INC.
#
# The copyright notice above does not evidence any actual or intended
# publication of such source code.
##ident "%W%"
#ident "$Header: $"# Location of the file that lists the subsystems we want to bypass for
# rc.d script handling.DONT_RUN_FILE="/etc/default/okprc"# Check first for a functional OpenServer shell. If there isn't one, then
# no further actions are possible.eval 'openserver /bin/sh -c "exit 0" 2>&1 >/dev/null' 2>&1 >/dev/nullif [ $? -ne 0 ]
then
exit 0
fi# If there is a list file, read in the list of subsystems to suppress.
# The input file may contain blank lines, and comments (these are lines
# beginning with '#' characters). If there's no list file, then we will
# suppress nothing.dont_run=""if [ -r "$DONT_RUN_FILE" ]
then
dont_run=`
while read line
do
# Ignore empty lines, and lines beginning with a '#'.
echo "$line" | egrep -q "^[[:space:]]*$"if [ $? -eq 0 ]; then
continue;
fiecho "$line" | egrep -q "^#"if [ $? -eq 0 ]; then
continue;
fi # Add the line's entry to our list.
echo "$line"
done <$DONT_RUN_FILE | tr '\n' ' '`
fi# Handle start and stop arguments as normal for UNIX.
case "$1" in
'start') # Process all files in OpenServer's etc/rc2.d.
for file in /openserver/etc/rc2.d/S* /openserver/etc/rc2.d/P* \
/openserver/etc/rc2.d/I*
do
base=`basename $file`if [ "$base" = 'S*' -o "$base" = 'P*' -o "$base" = 'I*' ]
then
continue
fi# Remove the leading S/P/I[0-9][0-9].
facility="`echo $base | cut -c4-`"# Check the list for things we don't run.
echo " $dont_run " | egrep -q "[[:space:]]$facility[[:space:]]"if [ $? -ne 0 ]
then
# Not a listed file, so run it, bypassing links. And
# run it inside the OpenServer personality.target=$fileif [ -h $file ]
then
target="`ls -l $file | awk '{ print $NF }'`"
fiif [ "`echo $target | cut -c -11`" = "/openserver" ]
then
target="`echo $target | cut -c 12-`"
fi if [ -f /openserver/$target ]
then
openserver /bin/sh -c "/$target start" 2>&1
fi
fi
done ;; 'stop') # Process all files in OpenServer's etc/rc0.d.
for file in /openserver/etc/rc0.d/K* /openserver/etc/rc2.d/P*
do
base=`basename $file`if [ "$base" = 'K*' -o "$base" = 'P*' ]
then
continue
fi# Remove the leading K[0-9][0-9].
facility="`echo $base | cut -c4-`"# Check the list for things we don't run.
echo " $dont_run " | egrep -q "[[:space:]]$facility[[:space:]]"if [ $? -ne 0 ]
then
# Not a listed file, so run it, bypassing links. And
# run it inside the OpenServer personality.target=$fileif [ -h $file ]
then
target="`ls -l $file | awk '{ print $NF }'`"
fiif [ "`echo $target | cut -c -11`" = "/openserver" ]
then
target="`echo $target | cut -c 12-`"
fiif [ -f /openserver/$target ]
then
openserver /bin/sh -c "/$target stop" 2>&1
fi fi
done;;*) echo "Usage: $0 { start | stop }" ;;
esacexit 0
<--- CUT HERE --->