autopkg / cgerke-recipes

AutoPKG Recipes
25 stars 11 forks source link

cgerke-recipes/ThinImaging/DefaultEnergySaver/Scripts/postinstall Script will never set Power Settings #1

Closed seansgm closed 9 years ago

seansgm commented 9 years ago

The script is expecting a third string passed to it. The first two strings aren't referred to. Regardless of the setting of the passed string, the script will always exit.

Unless path_root is "/" then exit. However the first if statement sets path_root to "" if path_root is "/", so the script will never run it's intended job.

As pmset will only set the value to the current running OS you may wish to just remove these if statements. Also you set formatted_date, but never use it, so you might want to remove this too.

cgerke commented 9 years ago

Thanks for the pickup.