Peter Eisentraut wrote: >> Good point...retitling. (The explanation is simply that Peter used an >> ACPI system) > > I think quite a lot of systems are ACPI these days. > >> I'll paste the error while I'm at it: >> ########################################################## >> # ACPI system but acpid not running. # >> # Please install acpid package, then restart powersaved! # >> ########################################################## >> invoke-rc.d: initscript powersaved, action "start" failed. > > If you don't want to put in a dependency on acpid (why?), then at least > you need to make sure that the postinst script doesn't fail.
You are right, many systems today are ACPI, but I don't want that people that have APM are forced to install acpid, that just doesn't seem right to me. In addition, having a static (package) dependency does not ensure, that acpid is actually running. It could be installed but disabled. So postinst would still fail. > Note, however, that if you install hundreds of packages at once, notices > that like that fly by and are never seen. It's not very reliable. Well, the message would also be shown on startup. But you are right, someone might overlook these messages. That's why I originally thought it's best and correct to fail in postinst. As Steve classified this behaviour as RC bug, I guess it's best to change postinst in case of a not running acpid, but I won't change the package dependencies or the init script. This is what I have in mind for powersaved.postinst: check_return() { RETVAL=$? # 5 is the return code for a not running acpid [ $RETVAL -eq 5 ] && return 0 exit $RETVAL } .... if [ -x "/etc/init.d/powersaved" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d powersaved start || check_return else /etc/init.d/powersaved start || check_return fi fi Steve, would that be the correct solution for this problem in your opinion? If so, I'll prepare and updated package asap. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature