diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-03-19 20:35:54 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-03-19 20:35:54 -0500 |
commit | 174f1430e76dfcf9d45e6d44422a47c2e2bba369 (patch) | |
tree | 3c53297e49409e0f072f8371cd731c191e4bd2e6 /pm/pm-functions.in | |
parent | ea374c82c37f881398cfa0eea2c7518286e1ae42 (diff) | |
parent | 55e3dbbfe6dc6ffae294cb1976a1a5c6cf9362da (diff) |
Merge branch 'vlowther-stabilization-bugfixes' into vlowther-default-parameters
Conflicts:
pm/pm-functions.in
Diffstat (limited to 'pm/pm-functions.in')
-rw-r--r-- | pm/pm-functions.in | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in index 7159ec9..f4bf755 100644 --- a/pm/pm-functions.in +++ b/pm/pm-functions.in @@ -20,15 +20,11 @@ PM_UTILS_RUNDIR="/var/run/pm-utils" PM_CMDLINE="$*" PATH=/sbin:/usr/sbin:/bin:/usr/bin:"${PM_UTILS_LIBDIR}"/bin -HIBERNATE_MODE="platform" -HIBERNATE_RESUME_POST_VIDEO=no INHIBIT="${PM_UTILS_RUNDIR}/inhibit" PM_LOGFILE="${PM_LOGFILE:=/var/log/pm-suspend.log}" -SUSPEND_MODULES="" TEMPORARY_CPUFREQ_GOVERNOR="performance" LOCKDIR="${PM_UTILS_RUNDIR}/locks" STORAGEDIR="${PM_UTILS_RUNDIR}/storage" -SLEEP_MODULE="kernel" NA=254 NX=253 DX=252 @@ -36,6 +32,14 @@ PM_FUNCTIONS="$PM_UTILS_LIBDIR/functions" # Use c sort order LC_COLLATE=C +# These should be overridden by defaults and/or config.d settings. +# Specifically, distros should override these by modifying defaults, +# and end users should modify these using files in /etc/pm/config. +HIBERNATE_MODE="shutdown" +HIBERNATE_RESUME_POST_VIDEO="no" +SLEEP_MODULE="kernel" +SUSPEND_MODULES="" + [ -f "${PM_UTILS_LIBDIR}"/defaults ] && . "${PM_UTILS_LIBDIR}"/defaults set +a @@ -49,6 +53,8 @@ done . "${PM_FUNCTIONS}" +log() { [ $LOGGING ] && echo $*; } + load_hook_blacklist() { [ -f "$PM_UTILS_ETCDIR/blacklist" ] || return @@ -61,6 +67,7 @@ load_hook_blacklist() # skip blank lines [ -z "$entry" ] && continue disablehook "${entry##*/}" "${comment:-blacklist}" + log "Blacklisting ${entry##*/}." done } @@ -101,14 +108,10 @@ load_hook_parameters() done < "$PM_UTILS_ETCDIR/parameters" } -log() { [ $LOGGING ] && echo $*; } - take_suspend_lock() { try_lock "pm-utils.lock" || return 1 mkdir -p "${STORAGEDIR}" - load_hook_blacklist - load_hook_parameters return 0 } |