Hide Forgot
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.
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. imc
works fine on RH6.0 here...