epoch1970;469320 Wrote: 
> Sorry to insist. Hibernate is *not* a power state that is available to
> end-users on macs.  The only people I know that care to tweak their
> pmset settings and use hibernate instead of suspend-to-ram are insecure
> former windows users. No, this is not a sarcasm.
> 
> That's really not important, but I think the settings when running on a
> mac could completely omit the hibernation state.
SrvrPowerCtrl's current mac scripts fully support both sleep (aka
suspend) and hibernation.  I didn't feel as though it was my place to
judge the efficacy of either method.  As long as the hardware and OS
supported it, I'd offer it.  My mac mini hibernates really well and I
can certainly think of instances where I'd want to use it...perhaps not
as the default on-idle action, but at least as an optional,
discretionary action...you know, to appease my windows inflicted
insecurities. ;-)

spc-sleep.sh

Code:
--------------------
    
  #!/bin/sh
  log_file="/Users/usrnm/Library/Logs/SqueezeCenter/srvrpowerctrl.log"
  now_time=`/bin/date`
  /bin/echo "At $now_time, $0 is attempting to suspend the system.." >>$log_file
  # hibernatemode 0 == suspend; hibernatemode 1 == hibernation; hibernatemode 3 
== safe sleep, i.e sleep+hibernation
  /usr/bin/pmset -a hibernatemode 0 >>$log_file
  # Wait 3 seconds to let the setting settle..
  /bin/sleep 3
  # Sleep the system..
  /sbin/shutdown -s now
  
--------------------

spc-hibernate.sh

Code:
--------------------
    
  #!/bin/sh
  log_file="/Users/usrnm/Library/Logs/SqueezeCenter/srvrpowerctrl.log"
  now_time=`/bin/date`
  /bin/echo "At $now_time, $0 is attempting to hibernate the system.." 
>>$log_file
  # hibernatemode 0 == suspend; hibernatemode 1 == hibernation; hibernatemode 3 
== safe sleep, i.e sleep+hibernation
  /usr/bin/pmset -a hibernatemode 1 >>$log_file
  # Wait 3 seconds to let the setting settle..
  /bin/sleep 3
  # Put the system into hibernation..
  /sbin/shutdown -s now
  
--------------------


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to