Bug 243 - Sporadic failure of /etc/init.d/xprint due dtksh bug
Summary: Sporadic failure of /etc/init.d/xprint due dtksh bug
Status: RESOLVED FIXED
Alias: None
Product: xprint
Classification: Unclassified
Component: Server: Config: startup scripts (show other bugs)
Version: unspecified
Hardware: SPARC Solaris
: high blocker
Assignee: Roland Mainz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-29 21:35 UTC by Roland Mainz
Modified: 2004-03-21 17:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch for 2004-03-01-trunk (1.30 KB, patch)
2004-02-29 21:39 UTC, Roland Mainz
no flags Details | Splinter Review

Description Roland Mainz 2004-02-29 21:35:59 UTC
Some people having problems to start Xprint directly from the tarball.

Starting the Xprint server works...
% ./run_xprint_from_tarball.sh start

... but the following may fail:
% ./run_xprint_from_tarball.sh get_xpserverlist
/tmp/xxx/xprint/install/etc/init.d/xprint: line 816: : is not an identifier

I have zero clue what may be the problem.
The matching code looks like this:
788 # Convenience function to obtain a list of available Xprint servers
789 do_get_xpserverlist()
790 {
791     if [ -f "${XP_PER_USER_SERVERS}" -o -f "${XP_GLOBAL_SERVERS}" ] ; then
792         xpserverlist=$(
793           # Enumerate both per-user and global servers (in that order)
794           (
795             [ -f "${XP_PER_USER_SERVERS}" ]  && cat "${XP_PER_USER_SERVERS}"
796             [ -f "${XP_GLOBAL_SERVERS}"   ]  && cat "${XP_GLOBAL_SERVERS}"
797           ) |
798             egrep "^display=.*:.* pid=[0-9]*$|^display=.*:[0-9]*$" |
799               while read i ; do
800                   (
801                     pid="none"
802                     eval ${i}
803                     # Check if the Xprt process exists (if possible)
804                     if [ "$pid" != "none" ] ; then
805                         if pexists ${pid} ; then
806                             echo ${display}
807                         fi
808                     else
809                         echo ${display}
810                     fi
811                   )
812               done | tr "[\n]" " "
813           )
814         # Only produce output if we have some entries...
815         [ "${xpserverlist}" != "" ] && echo "${xpserverlist}"
816     fi
817 }

The shell gurus from Debian claim that this is a bug in dtksh ... ;-(
Comment 1 Roland Mainz 2004-02-29 21:39:01 UTC
Created attachment 110 [details] [review]
Patch for 2004-03-01-trunk
Comment 2 Roland Mainz 2004-02-29 21:41:46 UTC
Patch checked-in into 009 release branch...

Checking in xc/programs/Xserver/Xprint/etc/init.d/xprint;
/cvs/xprint/xprint/src/xprint_main/xc/programs/Xserver/Xprint/etc/init.d/xprint,v 
<--  xprint
new revision: 1.43.2.2; previous revision: 1.43.2.1
done

... leaving bug open for commit to trunk.
Comment 3 Roland Mainz 2004-03-20 20:52:25 UTC
Patch checked-in into 010-trunk...

Checking in xc/programs/Xserver/Xprint/etc/init.d/xprint;
/cvs/xprint/xprint/src/xprint_main/xc/programs/Xserver/Xprint/etc/init.d/xprint,v 
<--  xprint
new revision: 1.45; previous revision: 1.44
done

... marking bug as FIXED.
Comment 4 Roland Mainz 2004-03-20 20:53:19 UTC
Alan:
Are there any RFEs in Sun's bug database to update the ksh93 parts of dtksh to a
newer version to get rid of these issues ?
Comment 5 Alan Coopersmith 2004-03-22 12:43:30 UTC
CDE is a legacy desktop environment and Sun is not likely to spend large amounts
of resources on further enhancements to it.  Sun customers who need enhancements
can of course contact their support and/or sales contacts to request them.

There is an open RFE for integration of ksh93 into Solaris as a general purpose
shell - this is Sun RFE id #4113420.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.