[kde] [Bug 349480] New: startkde shutdown scripts code is broken

Ivan Adzhubey iadzhubey at verizon.net
Mon Jun 22 01:30:07 BST 2015


https://bugs.kde.org/show_bug.cgi?id=349480

            Bug ID: 349480
           Summary: startkde shutdown scripts code is broken
           Product: kde
           Version: unspecified
          Platform: Ubuntu Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: iadzhubey at verizon.net

The following code at the bottom of /usr/bin/startkde script is broken:

# Run scripts found in <config locations>/plasma-workspace/shutdown
for prefix in `echo "$scriptpath"`; do
  for file in `ls "$prefix"/shutdown 2> /dev/null | egrep -v '(~|\.bak)$'`; do
    test -x "$prefix$file" && "$prefix$file"
  done
done

The "$prefix$file" variables expand to something like
"$HOME/.config/plasma-workspacescriptname.sh" which is NOT what we want, so the
test -x inside the loop will always fail and no shutdown scripts executed ever.

Should be replaced with something like the following:

# Run scripts found in <config locations>/plasma-workspace/shutdown
for prefix in `echo "$scriptpath"`; do
  shutdown_path="$prefix/shutdown"
  for file in `ls "$shutdown_path" 2>/dev/null | egrep -v '(~|\.bak)$'`; do
    test -x "$shutdown_path/$file" && "$shutdown_path/$file"
  done
done


Reproducible: Always

Steps to Reproduce:
1. Copy any executable script into $HOME/.config/plasma-workspace/shutdown/
2. Logout from KDE
3. Script will NOT execute

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list