Bug 119822 - syntax error in /etc/init.d/cupsrenice
Summary: syntax error in /etc/init.d/cupsrenice
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: RC 1
Hardware: i686 All
: P5 - None : Minor
Target Milestone: ---
Assignee: Klaus Singvogel
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-02 17:44 UTC by michel munnix
Modified: 2005-11-23 11:19 UTC (History)
2 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
output of ps -Af at time of the error (6.55 KB, text/plain)
2005-10-02 17:46 UTC, michel munnix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michel munnix 2005-10-02 17:44:46 UTC
This message is displayed on console after startup:
/etc/init.d/cupsrenice: line 58: [: too many arguments

line 58 checks if cupsd is running, but on my system, during startup, 2 cupsd
processes are running. This triggers the error.
I suggest to enclose x$ppid in double quotes
Comment 1 michel munnix 2005-10-02 17:46:00 UTC
Created attachment 51303 [details]
output of ps -Af at time of the error
Comment 2 Felix Möller 2005-10-03 21:03:14 UTC
The ps -A output at that time was probably like the following:
 6261 ?        00:00:00 cupsd
 6262 ?        00:00:00 cupsd

Therefore $ppid contained:
6261
6262

So the problem could be solved by changing:
    58          if [ x$ppid = x ]; then
    59                  return
    60          fi

to:
    58          if [ -z "$ppid" ]; then
    59                  return
    60          fi
Comment 3 Klaus Singvogel 2005-10-18 10:17:11 UTC
Thanks.
Sorry for delay, was in vacation.
Will work on it as scheduling and time permits.

This is not nice, but only lower priority: the script is only called once, when machine boots. --> adjusting.

Comment 4 Klaus Singvogel 2005-11-23 11:18:40 UTC
fixed in next version
Comment 5 Klaus Singvogel 2005-11-23 11:19:05 UTC
fixed in next version