Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 2987 - bug in apmd init script
Summary: bug in apmd init script
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apmd
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-05-23 21:07 UTC by Ian Collier
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-07-01 21:29:15 UTC

Attachments (Terms of Use)

Description Ian Collier 1999-05-23 21:07:11 UTC
I disagree with bug #1500.  If you quote the APMD_OPTIONS
then the shell will pass them as a single argument to the
apmd program.  Supposing /etc/sysconfig/apmd says

APMD_OPTIONS="-u -s /etc/apmd/suspend -r /etc/apmd/resume"

this will result in the following:

starbright:83-i# /etc/rc.d/init.d/apmd start
Starting up APM daemon: apmd /usr/sbin/apmd: invalid option
usage: apmd [-VvuW] [-p percent] [-w percent] [-c seconds]
            [-s pre_suspend_cmd] [-r post_resume_cmd]
            [-l low_battery_cmd]

The message occurs (I presume) because apmd sees the whole
command line as an argument to the -u flag, and the -u flag
doesn't take arguments.  Removing the quotes from
APMD_OPTIONS results in apmd being started correctly.

If it matters I am using apmd-3.0beta5-7 as taken from Red
Hat 6.0 and recompiled on Red Hat 5.1.

Ian Collier.

Comment 1 Ian Collier 1999-05-23 21:36:59 UTC
On second thoughts it might be better to write:

eval "daemon /usr/sbin/apmd $APMD_OPTIONS"

because that allows the user to use quoted strings in APMD_OPTIONS.


Comment 2 Bill Nottingham 1999-07-01 21:29:59 UTC
works fine on RH6.0 here...

Note You need to log in before you can comment on or make changes to this bug.