Bug 60895 - startkde doesn't process all shutdown script directories
Summary: startkde doesn't process all shutdown script directories
Status: RESOLVED FIXED
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 60896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-07 22:32 UTC by Caleb Tennis
Modified: 2003-10-14 18:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caleb Tennis 2003-07-07 22:32:00 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2 
OS:          Linux

Posting from: http://bugs.gentoo.org/show_bug.cgi?id=21121

KDE 3.1.1a

The startkde script (/usr/kde/3.1/bin/startkde) is supposed to process "shutdown
scripts" after KDE exit, but improperly parses the list of 'exe' paths returned
from kde-config, so only the first path in the list is processed as expected
(usually ~/.kde/shutdown/).

startkde includes the following code:

# Run scripts found in $KDEDIRS/shutdown
for prefix in `kde-config --path exe| sed -e 's^bin/^shutdown/^g;s^:^ ^'`
do
    # run each script...
done

The second substitution expression passed to sed (s^:^ ^) doesn't include the /g
modifier, so it replaces only the first path separator with the input field
separator, yielding:

/home/user/.kde/shutdown/ /usr/kde/3.1/shutdown/:/usr/shutdown/

Adding the /g modifier so that the argument to sed becomes
's^bin/^shutdown/^g;s^:^ ^g' fixes the problem.
Comment 1 Caleb Tennis 2003-07-07 22:33:34 UTC
*** Bug 60896 has been marked as a duplicate of this bug. ***
Comment 2 Waldo Bastian 2003-10-14 18:08:45 UTC
Fixed. Thanks for reporting.