Package Reference
The following sections document the what and where of each Power Manager sub-package.
Power Manager Framework
The Power Manager Framework package is required.
Requirements
Mac OS X 10.4 or later is required for this package.
Files Installed
Power Manager Framework installs the following within /Library/Frameworks/:
PowerManager.framework
Power Manager Core
The Power Manager Core package is required.
Requirements
Mac OS X 10.4 or later is required for this package.
Before installing Power Manager Core, the following packages must be installed:
- Power Manager Framework
Files Installed
Power Manager Core installs the following within /Library/Application Support/Power Manager/:
Daemons/pmdAgents/pmuserAgents/pmnotify.appAgents/Power Manager Scripting.appTools/pmctlTools/interfacesTools/Power Manager Access.appRemove Power Manager.appDocumentation/Power Manager Administrator.pdfDocumentation/Power Manager Release Notes.pdfDocumentation/Power Manager User Guide.pdf
Preflight Script
Before installing, Power Manager Core, executes the following script.
#!/bin/sh
# Part of DssW Power Manager
# Copyright (c) 2011 Dragon Systems Software Limited
# Support: support@dssw.co.uk
#
# System Administrators can safely omit this script.
#
# This script removes any legacy Power Manager 3 files.
# Wait, is Power Manager 3 even installed?
if [ ! -e '/usr/local/powermanager' ]; then
echo "Power Manager 3 is not installed, skipping preflight removal"
exit 0
fi
# The effective user ID must be 0 == root
if [[ $EUID -ne 0 ]]; then
echo "You must be a root to run this script" 2>&1
exit 1
fi
echo "DssW Power Manager 3 Removal Script"
# Ideally the upgrade is for this host.
# If not, some settings are left in place; the settings are safe
# but better removed in order to reduce clutter.
if [ "$3" = '/' ]; then
echo "...removing from: $3"
cd /
# Disable and stop Power Manager 3
if [ -e '/usr/local/powermanager/bin/powermanagerctl' ]; then
echo "...turning off Power Manager's schedule"
/usr/local/powermanager/bin/powermanagerctl scheduler.setenabled no
fi
# Unload the launchd jobs
LAUNCHD_FILES=(
'/Library/LaunchDaemons/uk.co.dssw.powermanager.plist' # host wide daemon
'/Library/LaunchAgents/uk.co.dssw.pmassistant.plist' # per-user assistants
'/Library/LaunchAgents/uk.co.dssw.pmloginwindow.plist' # login window agent
);
for (( i = 0 ; i < ${#LAUNCHD_FILES[@]} ; i++ ))
do
FILEPATH=${LAUNCHD_FILES[$i]}
if [ -e "$FILEPATH" ]; then
echo "...unloading: ${FILEPATH}"
/bin/launchctl unload "${FILEPATH}"
fi
done
# Programmatically remove the global login item
if [ -e '/usr/local/powermanager/bin/pmassistant.app/Contents/MacOS/pmassistant' ]; then
echo "...removing assistants' global login item"
/usr/local/powermanager/bin/pmassistant.app/Contents/MacOS/pmassistant -r
fi
# Remove security policy rights
if [ -e '/usr/local/powermanager/bin/powermanagerd' ]; then
echo "...revoking security policy rights"
/usr/local/powermanager/bin/powermanagerd -u
fi
# Disable the authentication plug-in
if [ -e "/System/Library/CoreServices/SecurityAgentPlugins/pmauth.bundle" ]; then
echo "...disable login window notification (pmauth)"
"/System/Library/CoreServices/SecurityAgentPlugins/pmauth.bundle/Contents/MacOS/pmauthctl" -u
fi
# Ensure authorization contains no mention of pmauth
sed -E -e '/^[[:space:]]+<string>pmauth:test<\/string>$/d' /etc/authorization > /tmp/authorization.dssw
install -b -B .pm -m 0644 -o root -g wheel -S /tmp/authorization.dssw /etc/authorization
rm /tmp/authorization.dssw
# Remove the files
REMOVE_FILES=(
'/Library/Application Support/Power Manager' # Preference pane's support files
'/Library/Automator/PMCancelEvents.action'
'/Library/Automator/PMDelayEvents.action'
'/Library/Automator/PMDeleteEvents.action'
'/Library/Automator/PMEvent.definition'
'/Library/Automator/PMEventsToStrings.caction'
'/Library/Automator/PMExportEvents.action'
'/Library/Automator/PMFilterEvents.action'
'/Library/Automator/PMImportEvents.action'
'/Library/Automator/PMListEvents.action'
'/Library/Automator/PMNewEvent.action'
'/Library/Automator/PMNextEvent.action'
'/Library/Automator/PMQuickSchedule.action'
'/Library/Automator/PMToggleScheduler.action'
'/Library/Documentation/Help/Power Manager Help' # Help Book symlink
'/Library/Frameworks/PowerManager.framework' # Shared framework needed to talk to the daemon
'/Library/LaunchDaemons/uk.co.dssw.powermanager.plist' # Launchd daemon job ticket (Mac OS X 10.4+)
'/Library/LaunchAgents/uk.co.dssw.pmassistant.plist' # Launchd agent job ticket (Mac OS X 10.5+)
'/Library/LaunchAgents/uk.co.dssw.pmloginwindow.plist' # Launchd agent job ticket (Mac OS X 10.5+)
'/Library/PreferencePanes/Power Manager.prefPane' # Preference pane
'/Library/StartupItems/PowerManager' # StartupItem (Mac OS X 10.3.9)
'/Library/Widgets/Power Manager.wdgt' # Dashboard widget (Mac OS X 10.4+)
'/System/Library/CoreServices/SecurityAgentPlugins/pmauth.bundle' # loginwindow plugin
'/usr/local/powermanager' # Unix daemon and command line tool
'/var/tmp/uk.co.dssw.powermanager' # Unix socket directory
);
for (( i = 0 ; i < ${#REMOVE_FILES[@]} ; i++ ))
do
FILEPATH=${REMOVE_FILES[$i]}
if [ -e "$FILEPATH" ]; then
echo "...removing file: ${FILEPATH}"
rm -r "${FILEPATH}"
fi
done
# Say goodbye
echo ""
echo "...Finished."
fi
exit 0
Postflight Script
After installing, Power Manager Core, executes the following script.
#!/bin/sh
# Part of DssW Power Manager
# Copyright (c) 2011 Dragon Systems Software Limited
# Support: support@dssw.co.uk
#
# System Administrators can safely omit this script.
#
# This script allows the inclusion of an optional configuration file in the installer.
CONFIGURATION_FILENAME="pmd.plist"
CONFIGURATION_EMBEDDED_PATH="$1/Contents/Resources/$CONFIGURATION_FILENAME"
CONFIGURATION_DIRECTORY_PATH="$3Library/Application Support/Power Manager/Configuration"
CONFIGURATION_PATH="$CONFIGURATION_DIRECTORY_PATH/$CONFIGURATION_FILENAME"
# Install the optional configuration
if [ -e "$CONFIGURATION_EMBEDDED_PATH" ]; then
echo "Installing embedded configuration"
# Copy configuration into Configuration directory
mkdir -p "$CONFIGURATION_DIRECTORY_PATH"
cp "$CONFIGURATION_EMBEDDED_PATH" "$CONFIGURATION_PATH"
# Touch configuration to update last modified date; ensures configuration is applied
touch "$CONFIGURATION_PATH"
# Secure configuration
chown -R root "$CONFIGURATION_DIRECTORY_PATH"
chmod 640 "$CONFIGURATION_PATH"
chmod 755 "$CONFIGURATION_DIRECTORY_PATH"
fi
Power Manager launchd Daemons
The Power Manager launchd Daemons package is required.
Requirements
Mac OS X 10.4 or later is required for this package.
Before installing Power Manager launchd Daemons, the following packages must be installed:
- Power Manager Framework
- Power Manager Core
After installing Power Manager launchd Daemons, a restart is required.
Files Installed
Power Manager launchd Daemons installs the following within /Library/LaunchDaemons/:
uk.co.dssw.pmd.plist
Power Manager launchd Agents
The Power Manager launchd Agents package is required.
Requirements
Mac OS X 10.5 or later is required for this package.
Before installing Power Manager launchd Agents, the following packages must be installed:
- Power Manager Framework
- Power Manager Core
After installing Power Manager launchd Agents, a restart is required.
Files Installed
Power Manager launchd Agents installs the following within /Library/LaunchAgents/:
uk.co.dssw.pmuser.plistuk.co.dssw.pmnotify.plistuk.co.dssw.pmnotify.login.plist
Postflight Script
After installing, Power Manager launchd Agents, executes the following script.
#!/bin/sh
# Part of DssW Power Manager
# Copyright (c) 2011 Dragon Systems Software Limited
# Support: support@dssw.co.uk
# Remove any depreciated universal login items from Mac OS X 10.4
PM_DIRECTORY_PATH="$3Library/Application Support/Power Manager"
PMULI_PATH="$PM_DIRECTORY_PATH/Tools/pmuli"
if [ -e "$PMULI_PATH" ]; then
echo "Removing deprecated universal login items"
"$PMULI_PATH" remove "$PM_DIRECTORY_PATH"
fi
Power Manager Login Agents
The Power Manager Login Agents package is required.
Requirements
Mac OS X 10.4 is required for this package.
Before installing Power Manager Login Agents, the following packages must be installed:
- Power Manager Core
![]() |
Note |
|---|---|
|
Mac OS X 10.5 and later are not supported. |
Files Installed
Power Manager Login Agents installs the following within /Library/Application Support/Power Manager/Tools/:
pmulipmuser.app
Postflight Script
After installing, Power Manager Login Agents, executes the following script.
#!/bin/sh
# Part of DssW Power Manager
# Copyright (c) 2011 Dragon Systems Software Limited
# Support: support@dssw.co.uk
# Install the universal login items (Mac OS X 10.4 only)
PM_DIRECTORY_PATH="$3Library/Application Support/Power Manager"
AGENTS_DIRECTORY_PATH="$PM_DIRECTORY_PATH/Agents"
TOOLS_DIRECTORY_PATH="$PM_DIRECTORY_PATH/Tools"
PMULI_PATH="$TOOLS_DIRECTORY_PATH/pmuli"
if [ -e "$PMULI_PATH" ]; then
echo "Installing universal login items"
"$PMULI_PATH" install "$TOOLS_DIRECTORY_PATH/pmuser.app"
"$PMULI_PATH" install "$AGENTS_DIRECTORY_PATH/pmnotify.app"
else
echo "pmuli tool is missing: $PMULI_PATH"
exit 1
fi
Power Manager Automator
The Power Manager Automator package is recommended but not required.
Requirements
Mac OS X 10.5 or later is required for this package.
Before installing Power Manager Automator, the following packages must be installed:
- Power Manager Framework
Files Installed
Power Manager Automator installs the following within /Library/Automator/:
PMCancelEvents.actionPMDelayEvents.actionPMDeleteEvents.actionPMEvent.definitionPMEventsToStrings.cactionPMExportEvents.actionPMFilterEvents.actionPMImportEvents.actionPMListEvents.actionPMNewEvent.actionPMNextEvent.actionPMResetEvents.actionPMToggleScheduler.action
Power Manager System Preference
The Power Manager System Preference package is recommended but not required.
Requirements
Mac OS X 10.4 or later is required for this package.
Before installing Power Manager System Preference, the following packages must be installed:
- Power Manager Framework
Files Installed
Power Manager System Preference installs the following within /Library/PreferencePanes/:
Power Manager.prefPane
Power Manager SDK
The Power Manager SDK package is recommended but not required.
Requirements
Mac OS X 10.4 or later is required for this package.
Before installing Power Manager SDK, the following packages must be installed:
- Power Manager Framework
Files Installed
Power Manager SDK installs the following within /Library/Application Support/Power Manager/Developer/:
Power Manager Developer.pdfPower Manager AppleScript.pdfExamples
Power Manager OpenPAM
The Power Manager OpenPAM package is required.
Requirements
Mac OS X 10.6 or later is required for this package.
Files Installed
Power Manager OpenPAM installs the following within /etc/pam.d/:
uk.co.dssw.powermanager.openpam
Power Manager PAM
The Power Manager PAM package is required.
Requirements
Mac OS X 10.4 is required for this package.
![]() |
Note |
|---|---|
|
Mac OS X 10.6 and later are not supported. |
Files Installed
Power Manager PAM installs the following within /etc/pam.d/:
uk.co.dssw.powermanager.pam
Power Manager Keychain
The Power Manager Keychain package is required.
Requirements
Mac OS X 10.4 is required for this package.
![]() |
Note |
|---|---|
|
Mac OS X 10.5 and later are not supported. |
Files Installed
Power Manager Keychain installs the following within /Library/Application Support/Power Manager/Documentation:
About Keychains.txt
Postflight Script
After installing, Power Manager Keychain, executes the following script.
#!/bin/sh
# Part of DssW Power Manager
# Copyright (c) 2011 Dragon Systems Software Limited
# Support: support@dssw.co.uk
# Remove the previous keychain. Bypasses a Mac OS X bug (Mac OS X 10.4 only).
PM_DIRECTORY_PATH="$3Library/Application Support/Power Manager"
KEYCHAIN_PATH="$PM_DIRECTORY_PATH/Keychains/Default.keychain"
if [ -e "$KEYCHAIN_PATH" ]; then
echo "Removing Power Manager TLS/SSL keychain"
rm "$KEYCHAIN_PATH"
fi
![[Note]](images-note.png)