All Projects

IDProjectCategoryTask TypeSeveritySummaryStatusProgressOperating System
 332 OpenPandora Main OSCoreBug ReportMedium op_lidsettings.sh and op_power.sh scripts fail for some ...Closed
100%
Release 1 (Zaxxon) Task Description

/usr/pandora/scripts/op_lidsettings.sh and /usr/pandora/scripts/op_power.sh fail for some usernames due to poor shell scripting

 

these scripts find their config files by grepping /etc/passwd for the uer currently running xfce4-session, but the loose regexp matches too much. this shell fragment from op_lidsettings.sh:

 

grep /etc/passwd -e $(ps u -C xfce4-session | tail -n1 | awk '{print $1}')| cut -f 6 -d ":"

 

when a use called "me" is logged in, returns

 

/home/root

/usr/games

/var/run/dbus

/home/me

 

rather than just "/home/me"

 

all instances of that construct (reading and writing settings, in both op_lidsettings.sh and op_power.sh) should be changed to

 

grep /etc/passwd -e ^$(ps u -C xfce4-session | tail -n1 | awk '{print $1}'): | cut -f 6 -d ":"

 

to correctly match only the complete username field in /etc/passwd

Showing tasks 1 - 1 of 1 Page 1 of 1

Available keyboard shortcuts

Tasklist

Task Details

Task Editing