| Summary: | Incorrect "test" evaluate condition in /opt/trinity/bin/startkde startup script | ||
|---|---|---|---|
| Product: | TDE | Reporter: | yehjj |
| Component: | tdebase | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bugwatch, darrella |
| Priority: | P5 | ||
| Version: | 3.5.13 [Trinity] | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Attachments: |
Patch to fix startkde script problem
Test script |
||
Created attachment 301 [details]
Test script
Patch updated for renaming requirements and merged with other starttde fixes in attachment 458 [details] of bug report 675. Please do not merge the patch attached to this bug report.
This bug report was resolved with the latest patches submitted in bug report 675. |
Created attachment 300 [details] Patch to fix startkde script problem OS: Fedora 16 i386 Issue: Due to incorrect "test" evaluate condition, startkde will always export "LD_PRELOAD" when there does not exist file "/opt/trinity//share/kgtk/preload". Test: Using attachment's "test.sh" scripts. Test Result by command " sh -x ./test.sh ": ----------------------------------------------------------- + test -n /opt/trinity/:/usr:/usr/ ++ echo /opt/trinity/:/usr:/usr/ ++ sed -e 's/:.*//' + kdedirs_first=/opt/trinity/ + echo '[startkde] kdedirs_first: /opt/trinity/' [startkde] kdedirs_first: /opt/trinity/ + '[' -r /opt/trinity//share/kgtk/preload ']' + '[' -n ']' + '[' -e /usr/lib64/libnspr4.so ']' + '[' -e /usr/lib/libnspr4.so ']' + KGTK_NSPR_PRELOAD=/usr/lib/libnspr4.so: + export LD_PRELOAD=:/usr/lib/libnspr4.so::/usr/lib/libnspr4.so: + LD_PRELOAD=:/usr/lib/libnspr4.so::/usr/lib/libnspr4.so: ----------------------------------------------------------- Then Modify "test.sh" with following patch: --- test.sh.00 2012-01-29 18:54:59.000000000 +0800 +++ test.sh 2012-01-29 18:55:05.000000000 +0800 @@ -13,7 +13,7 @@ else fi fi -if [ -n $KGTK_PRELOAD ]; then +if [ -n "$KGTK_PRELOAD" ]; then if [ -e /usr/lib64/libnspr4.so ]; then KGTK_NSPR_PRELOAD="/usr/lib64/libnspr4.so:" elif [ -e /usr/lib/libnspr4.so ]; then Test Result by command " sh -x ./test.sh " after patch: ----------------------------------------------------------- + test -n /opt/trinity/:/usr:/usr/ ++ echo /opt/trinity/:/usr:/usr/ ++ sed -e 's/:.*//' + kdedirs_first=/opt/trinity/ + echo '[startkde] kdedirs_first: /opt/trinity/' [startkde] kdedirs_first: /opt/trinity/ + '[' -r /opt/trinity//share/kgtk/preload ']' + '[' -n '' ']' -----------------------------------------------------------