> Date: Wed, 15 May 2013 18:08:43 -0400
> From: Ted Unangst <[email protected]>
>
> I would like for apmd to tell me when the system goes to sleep, not
> just when it wakes up.
Don't really care if we do this or not. But please remove "APM" from
the messages if we do. And I thing you should call suspend, "suspend"
and not "sleep".
> Index: apmd.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v
> retrieving revision 1.59
> diff -u -p -r1.59 apmd.c
> --- apmd.c 29 Apr 2013 00:28:23 -0000 1.59
> +++ apmd.c 15 May 2013 22:04:52 -0000
> @@ -476,6 +476,7 @@ handle_client(int sock_fd, int ctl_fd)
> void
> suspend(int ctl_fd)
> {
> + syslog(LOG_NOTICE, "system entering APM sleep");
> do_etc_file(_PATH_APM_ETC_SUSPEND);
> sync();
> sleep(1);
> @@ -485,6 +486,7 @@ suspend(int ctl_fd)
> void
> stand_by(int ctl_fd)
> {
> + syslog(LOG_NOTICE, "system entering APM standby");
> do_etc_file(_PATH_APM_ETC_STANDBY);
> sync();
> sleep(1);
> @@ -494,6 +496,7 @@ stand_by(int ctl_fd)
> void
> hibernate(int ctl_fd)
> {
> + syslog(LOG_NOTICE, "system entering APM hibernation");
> do_etc_file(_PATH_APM_ETC_HIBERNATE);
> sync();
> sleep(1);
>
>