pm-utils-1.4.1/0000755000175000017500000000000011414120570010263 500000000000000pm-utils-1.4.1/README0000644000175000017500000000411411414116753011073 00000000000000=== pm-utils === What is pm-utils? * Pm-utils provides simple shell command line tools to suspend and hibernate computer that can be used to run vendor, distribution, or user supplied scripts on suspend and resume. Why do we need it? * All the main distributions are re-implementing the same functionality to support common power management operations. pm-utils provides a standardized distribution agnostic layout and interface for common power management tasks, which frees software and hardware vendors from having to maintain distribution-specific suspend/resume functionality. * Suspend/resume functionality can be easily modified by installing files into the /etc/pm/sleep.d directory. These files, known as hooks, can perform specific tasks on suspend/resume, such as: - enabling and disabling standby LED's on laptop hardware - enabling suspend GUI's like suspend2 - re-enabling video - starting and stopping services that can't cope with suspending - re-syncing the time with ntp - removing and modprobing modules when needed - setting grub to be the default target for a hibernate-resume - other wacky things that need doing on specific systems How do hooks work? * You put an executable file in /etc/pm/sleep.d. When suspend or hibernate is called, several things happen: 1) The files in /etc/pm/config.d/* are evaluated in C sort order. These files can be provided by individual packages outside of pm-utils, and contain globally available configuration settings for pm-utils and the hooks. 2) Each of the hooks in /etc/pm/sleep.d/* are executed in C sort order, with a command line argument of either "suspend" or "hibernate". 3) The system suspends or hibernates. 4) Some event happens to wake the machine up 5) Each of /etc/pm/sleep.d/* are executed in reverse C sort order, with a command line argument of "resume" or "thaw". * For more detailed information on how hooks work and how to write one, read HOWTO.hooks . * For information on how to debug pm-utils, read README.debugging. That's it! pm-utils-1.4.1/configure.ac0000644000175000017500000000274411414117723012506 00000000000000AC_PREREQ(2.52) AC_INIT(pm-utils, 1.4.1) AC_CONFIG_SRCDIR(src) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) AC_PROG_CC AC_PROG_LN_S dnl --------------------------------------------------------------------------- dnl - Manual page build dnl --------------------------------------------------------------------------- AC_ARG_ENABLE([doc], AC_HELP_STRING([--disable-docs], [Disable manpage generating via xmlto [[default=auto]]]), [MAN="$enableval"], [MAN=auto]) AC_PATH_PROG(XMLTO, xmlto, no) AS_IF([test "x$MAN" = "xyes"], [ AS_IF([test "x$XMLTO" = "xno"], [AC_MSG_ERROR([Manpage generating requested but xmlto not found.]) ]) ], [test "x${MAN}" != "xno"], [ AS_IF([test "x$XMLTO" != "xno"], [MAN="yes"], [MAN="no"]) ]) AM_CONDITIONAL(HAVE_XMLTO, [test "x$MAN" != xno]) AC_MSG_RESULT([checking whether to build manpages... $MAN]) dnl --------------------------------------------------------------------------- dnl - Makefiles, etc. dnl --------------------------------------------------------------------------- AC_OUTPUT([ Makefile pm-utils.pc man/Makefile src/Makefile pm/Makefile pm/sleep.d/Makefile pm/power.d/Makefile pm/module.d/Makefile ]) dnl ========================================================================== echo " pm-utils $VERSION ================== prefix: ${prefix} compiler: ${CC} cflags: ${CFLAGS} " pm-utils-1.4.1/aclocal.m40000644000175000017500000010432511414120257012052 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],, [m4_warning([this file was generated for autoconf 2.66. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR pm-utils-1.4.1/README.debugging0000644000175000017500000000640511414117645013033 00000000000000End-user customization and debugging: * If a particular hook is causing problems on your system, you can disable it using the HOOK_BLACKLIST environment variable by creating a file in /etc/pm/config.d and adding the line: HOOK_BLACKLIST="hookname 99another-hook" * If a parameter (or lack thereof) passed to pm-suspend and friends is causing problems, or you need to debug the suspend/resume process to work out what quirks are causing problems, you can use the ADD_PARAMETERS and DROP_PARAMETERS environment variables. To do this, create a file in /etc/pm/config.d, and add the following lines to it: ADD_PARAMETERS="--parameter-to-add --another-parameter" DROP_PARAMETERS="--parameter-to-drop --another-parameter-to-drop" If you want to drop all parameters (for testing purposes, or to work around bugs in HAL), you can use DROP_PARAMETERS="all" * If you suspect that a kernel module is preventing you from being able to suspend and resume, you can use the SUSPEND_MODULES environment variable to have that module removed when the system suspends and reloaded when the system wakes up. * If your clock drifts across a sleep/wake cycle, you can use NEED_CLOCK_SYNC="true" to force pm-utils to synchronize clocks. This is a change in the default behaviour of pm-utils -- 1.2.2.1 and earlier always synchronized clocks, but doing so is slow and most hardware stays in sync without assistance. * If you want to see (and log) tons of debugging output, you can use PM_DEBUG="true" to have the script log each action as it performs it. * If you want to see how long pm-utils takes to run hooks. you can use PM_PROFILE="true" to log timing information on how long each hook takes and how long running the hooks takes overall. * To find out what parameters can be passed to pm-suspend and friends, run them with '--help' as the first parameter as root. This will print out the options that it supports and which hooks or modules handle those options. * To override the usual quirk filtering (for kernel modesetting, binary drivers, and exotic hardware), pass --quirk-test along with any other quirks you want to try. This may make your system crash in new and exciting ways by conflicting with the kernel when suspending or resuming, but is very useful for debugging. You have been warned. Significant conceptual changes from pm-utils 0.99.x and earlier: * Do not rely on the internals of hooks when configuring or customizing pm-utils. Conceptually, hooks are black boxes from the point of view of the pm-utils core code, and there is no guarantee that the implementation of a given hook will not change from pm-utils revision to pm-utils revision. * The preferred method of modifying the behaviour of a hook is to modify the ADD_PARAMETERS and DROP_PARAMETERS to change the global parameters available to each hook. * All scripts created and maintained by the pm-utils are POSIX/SuS compliant. Any modification or new script should be POSIX compliant and work as intended using dash and posh before you submit a patch upstream. The sole exception is the video quirk database handler, which would be a couple of orders of magnitude slower when written in POSIX sh, due to how heavily it relies on bash native regular expression support. pm-utils-1.4.1/README.distributions0000644000175000017500000000277711414117645014012 00000000000000Note for distro maintainers: When writing sleep hooks, please consider adding any needed hooks to the package that requires the hooks, rather than pm-utils. An example would be if you distro wants anacron to run on resume -- the optimal fix would be to have the anacron package install a hook in /usr/lib/pm-utils/sleep.d that wakes anacron up on resume. This will also help package maintenance by allowing package maintainers to keep track of what the best way to handle any suspend/resume functionality their package requires insteas of leaving it up to the pm-utils maintainers to guess at what functionality is needed. To make this easier, pm-utils supports pkg-config, which makes it easy for packages that use automake to detect the presence of pm-utils and the locations that hooks should be installed in. The pm-utils pkgconfig file exports the following variables: pm_libdir: This is the directory that the pm-utils infrastructure is installed in. /usr/lib/pm-utils is the default value pm_sysconfdir: This is the directory that any package-specific pm-utils related config files should be installed in. Defaults to /etc/pm/config.d pm_sleephooks: This is the directory that sleep hooks are installed in. Defaults to ${pm_libdir}/sleep.d pm_powerhooks: This is the directory that power management hooks are installed in. Defaults to ${pm_libdir}/power.d pm_sleepmodules: This is the directory that sleep modules are installed in. Defaults to ${pm_libdir}/module.d pm-utils-1.4.1/Makefile.am0000644000175000017500000000101711414116753012246 00000000000000SUBDIRS = pm man src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = pm-utils.pc dist_doc_DATA = README \ README.debugging \ README.distributions EXTRA_DIST = ChangeLog .PHONY: ChangeLog ChangeLog: @if test -d $(srcdir)/.git; then \ echo git --git-dir="$(srcdir)/.git" log > $@; \ git --git-dir="$(srcdir)/.git" log > $@; \ elif test -f $(srcdir)/ChangeLog; then \ touch $(srcdir)/$@; \ else \ touch $@; \ fi dist-hook: ChangeLog MAINTAINERCLEANFILES = ChangeLog clean-local : rm -f *~ pm-utils-1.4.1/Makefile.in0000644000175000017500000006127011414120262012254 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(srcdir)/pm-utils.pc.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = pm-utils.pc CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" DATA = $(dist_doc_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = pm man src pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = pm-utils.pc dist_doc_DATA = README \ README.debugging \ README.distributions EXTRA_DIST = ChangeLog MAINTAINERCLEANFILES = ChangeLog all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 pm-utils.pc: $(top_builddir)/config.status $(srcdir)/pm-utils.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dist_docDATA install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-dist_docDATA uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-local ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dist_docDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-dist_docDATA uninstall-pkgconfigDATA .PHONY: ChangeLog ChangeLog: @if test -d $(srcdir)/.git; then \ echo git --git-dir="$(srcdir)/.git" log > $@; \ git --git-dir="$(srcdir)/.git" log > $@; \ elif test -f $(srcdir)/ChangeLog; then \ touch $(srcdir)/$@; \ else \ touch $@; \ fi dist-hook: ChangeLog clean-local : rm -f *~ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pm-utils-1.4.1/config.h.in0000644000175000017500000000116111414120261012222 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Version number of package */ #undef VERSION pm-utils-1.4.1/pm-utils.pc.in0000644000175000017500000000061511414116753012720 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ sysconfdir=@sysconfdir@ pm_libdir=${libdir}/pm-utils pm_sysconfdir=${sysconfdir}/pm pm_sleephooks=${pm_libdir}/sleep.d pm_powerhooks=${pm_libdir}/power.d pm_sleepmodules=${pm_libdir}/module.d pm_configdir=${pm_sysconfdir}/config.d Name: pm-utils Description: Power management scripts for suspend and hibernate Version: @PACKAGE_VERSION@ pm-utils-1.4.1/configure0000755000175000017500000042443211414120260012117 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.66 for pm-utils 1.4.1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='pm-utils' PACKAGE_TARNAME='pm-utils' PACKAGE_VERSION='1.4.1' PACKAGE_STRING='pm-utils 1.4.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAVE_XMLTO_FALSE HAVE_XMLTO_TRUE XMLTO LN_S am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_doc ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures pm-utils 1.4.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/pm-utils] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of pm-utils 1.4.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-docs Disable manpage generating via xmlto [[default=auto]] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF pm-utils configure 1.4.1 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by pm-utils $as_me 1.4.1, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=pm-utils VERSION=1.4.1 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Check whether --enable-doc was given. if test "${enable_doc+set}" = set; then : enableval=$enable_doc; MAN="$enableval" else MAN=auto fi # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XMLTO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $XMLTO in [\\/]* | ?:[\\/]*) ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_XMLTO" && ac_cv_path_XMLTO="no" ;; esac fi XMLTO=$ac_cv_path_XMLTO if test -n "$XMLTO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 $as_echo "$XMLTO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$MAN" = "xyes"; then : if test "x$XMLTO" = "xno"; then : as_fn_error $? "Manpage generating requested but xmlto not found." "$LINENO" 5 fi elif test "x${MAN}" != "xno"; then : if test "x$XMLTO" != "xno"; then : MAN="yes" else MAN="no" fi fi if test "x$MAN" != xno; then HAVE_XMLTO_TRUE= HAVE_XMLTO_FALSE='#' else HAVE_XMLTO_TRUE='#' HAVE_XMLTO_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking whether to build manpages... $MAN" >&5 $as_echo "checking whether to build manpages... $MAN" >&6; } ac_config_files="$ac_config_files Makefile pm-utils.pc man/Makefile src/Makefile pm/Makefile pm/sleep.d/Makefile pm/power.d/Makefile pm/module.d/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then as_fn_error $? "conditional \"HAVE_XMLTO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by pm-utils $as_me 1.4.1, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ pm-utils config.status 1.4.1 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pm-utils.pc") CONFIG_FILES="$CONFIG_FILES pm-utils.pc" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "pm/Makefile") CONFIG_FILES="$CONFIG_FILES pm/Makefile" ;; "pm/sleep.d/Makefile") CONFIG_FILES="$CONFIG_FILES pm/sleep.d/Makefile" ;; "pm/power.d/Makefile") CONFIG_FILES="$CONFIG_FILES pm/power.d/Makefile" ;; "pm/module.d/Makefile") CONFIG_FILES="$CONFIG_FILES pm/module.d/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo " pm-utils $VERSION ================== prefix: ${prefix} compiler: ${CC} cflags: ${CFLAGS} " pm-utils-1.4.1/AUTHORS0000644000175000017500000000026711414116753011270 00000000000000Bill Nottingham Peter Jones David Zeuthen Richard Hughes Victor Lowther pm-utils-1.4.1/COPYING0000644000175000017500000004311011414116753011245 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. pm-utils-1.4.1/ChangeLog0000644000175000017500000060065611414120570011772 00000000000000commit d6aca587e2e9b90f7d0379d5bd4b792ae68fc2cc Author: Victor Lowther Date: Sun Jul 4 09:51:24 2010 -0500 Bump version to 1.4.1 commit dab7a79faf67ad5f33d15cc90b7fa34f61cf4c90 Author: Tomáš Chvátal Date: Sun Jul 4 09:23:26 2010 -0500 Do not automagically rely on xmlto, include a configure option instead. Thanks, Tomáš! commit 87883a1cc89618b5a985a9c78f8234fc1570c54c Author: Victor Lowther Date: Tue Jun 22 19:09:40 2010 -0500 Make on_ac_power check sysfs directly. This avoids us depending on power managers that depend on us. commit 0326034188bfd6943c4958775b7b18e701c3c0ca Author: Victor Lowther Date: Sat Jun 19 18:31:12 2010 -0500 Update configure.ac to 1.4.0 commit 9b06ee14de8ec8e72d7c1c12d380fcca609caa73 Author: Victor Lowther Date: Sat Jun 19 18:20:14 2010 -0500 Oops, stop worrying about disabling wake on lan for wireless. commit 646a20af9b48d1bb4630f237a345e82ffb2921b5 Merge: 1fd247d 79dde6f Author: Victor Lowther Date: Sat Jun 19 18:10:00 2010 -0500 Merge remote branch 'UPSTREAM/pm-utils-1.4' into pm-utils-1.4 commit 1fd247d087ed73896d2b2156039dff2a353f6db6 Author: Victor Lowther Date: Sat Jun 19 18:08:19 2010 -0500 Fix stupid error in sata_alpm commit 79dde6f2f7bb620b163981ec7a7b995c9c9d1b0e Author: Michael Biebl Date: Fri Jun 18 15:15:16 2010 +0200 Use flock for more robust lock file handling Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568565 commit 8e63749b7ec708df9ea21cde0b99d060e71dbb9a Author: Michael Biebl Date: Fri Jun 18 08:09:56 2010 +0200 Various small man page updates and fixes commit 2cf0e870ceac51b9f1c706d15f775f8a050680cd Author: Victor Lowther Date: Tue Jun 15 07:07:45 2010 -0500 Bump to pm-utils-1.4.0-rc2 commit ef1e0968b93d2e3425183e6f18747082b5c3a7c5 Author: Victor Lowther Date: Tue Jun 15 07:03:22 2010 -0500 Added informative messages to some of the sleep hooks. commit cb0ad2d4e13972810ebbe2a979b5cb37d740149a Author: Victor Lowther Date: Mon Jun 14 15:10:52 2010 -0500 Make powersave hooks a little more verbose. commit b540f8f5c4fffad793d0a4938feb80d6f1f04c18 Author: Victor Lowther Date: Mon Jun 14 15:29:42 2010 -0500 Change hook run printing to make it not look ugly. Hooks can print things too. commit b9909dfe65f41eceaf771a7f0caa852fab2839e2 Author: Victor Lowther Date: Mon Jun 14 13:25:24 2010 -0500 Fix some thinkos introduced by the wireless hooks changes. Among other things, we were not actually enabling power management for wireless adaptors. We are now. commit 1afc0d335b5a55c770ebe12bfe8604a12ca24753 Author: Victor Lowther Date: Mon Jun 14 10:29:20 2010 -0500 Oops, missed some Makefile.am updates. commit b5abeba798d406c1a2b9667966768223b890f19b Author: Victor Lowther Date: Mon Jun 14 08:15:30 2010 -0500 Add a hook to disable polling optical media while on battery. commit f81a0b13ebd8f6e0f3c3d0ed71e243cf10f0a7f7 Author: Victor Lowther Date: Mon Jun 14 07:34:59 2010 -0500 import-fdi-quirkdb was only ever a temporary hack. Now that we handle the quirk database, it goes byebye. commit aef6bd0834ba098fa4692ee61823a59cfdf0e63f Author: Victor Lowther Date: Mon Jun 14 07:25:25 2010 -0500 Fix a typo in README.distributions. commit 7fa3d26ccdc5639a2b99da3d758d0dca6dc56a2c Author: Victor Lowther Date: Mon Jun 14 07:23:32 2010 -0500 Update README.debugging. commit 257b46f303e1b896cbd8f9b64af92af3857a3f61 Author: Victor Lowther Date: Mon Jun 14 07:19:35 2010 -0500 Update TODO file commit 984f135ca4140f5f17dee14c0a9bd06a85ca5f82 Author: Victor Lowther Date: Sat Jun 12 09:53:56 2010 -0500 Update NEWS. commit 31cc0a75f5dbe7bc2d372a9223dcf4a635a73201 Author: Victor Lowther Date: Sat Jun 12 09:28:27 2010 -0500 The power management stuff deserves its own branch. commit a4e4b0ce456c66d01d9c5f09a73242d2db6c65e9 Author: Victor Lowther Date: Sat Jun 12 13:07:51 2010 -0500 Update git tree packaging to conflict with laptop-mode-tools The new powermanagement scripts conflict with laptop-mode-tools. Make sure both are not installed at the same time. commit cbb1de4dd5c79641169316e232b630662ecbf46f Author: Victor Lowther Date: Sat Jun 12 12:52:36 2010 -0500 Add more specificity to the wireless hook. Explicity handle Intel wireless cards according to their unique requirements. If only iwconfig power on/off did The Right Thing on all the cards. commit eaebe53f016fb1a875a13de225b1d9d4e2db197c Author: Victor Lowther Date: Fri Jun 11 07:25:09 2010 -0500 Update provides= line in PKGBUILD to privide version 9999 commit 9b059c01da46c12d026002ebaeb5a3c0cdd59a78 Author: Chase Douglas Date: Tue Jun 8 14:57:13 2010 -0400 Fix paths for sched_powersave script The paths had a leading stray '$' and the hyperthreading path was incorrect. Signed-off-by: Chase Douglas commit c97842b99029e81c138744f34f05746e7309a611 Author: Chase Douglas Date: Tue Jun 8 14:47:26 2010 -0400 Fix audio powersave script to look for snd_* modules Without this change the snd_hda_intel module is skipped. Signed-off-by: Chase Douglas commit e2ea60907ca2b30e1ac5744d3e17dff16ed910ce Author: Victor Lowther Date: Wed Jun 9 05:23:57 2010 -0500 Refuse to change sata link pm states on kernels < 2.6.33 Kernels earlier then 2.6.33 have a bug that can cause filesystem corruption due to the upper layers aborting a transaction instead of retrying it if the sata link glitches out momentarily during a power state transition. commit 4eaf130c73b3234ed980866ce54a311407accf36 Author: Victor Lowther Date: Sat Jun 5 14:09:07 2010 -0500 Oops, forgot to add service script into the ight Makefile.am. commit 12a931d4db8258049c5d619bb99f4f58ef600de1 Author: Victor Lowther Date: Sat Jun 5 13:52:24 2010 -0500 There are no actual users of chassis_type anymore, get rid of it. commit 58a67a9cbb8637c8cfe4ea06d5d956af0704f498 Author: Victor Lowther Date: Fri Jun 4 11:56:11 2010 -0500 Add help functionality to pm-powersave commit 32b72f406ad5bf92dddb2092082891f8225618f4 Author: Victor Lowther Date: Fri Jun 4 11:31:48 2010 -0500 Update Makefile.am to include new hooks. commit 27bf3ee21864ff27b3b9de47dbf101179e1b2434 Author: Victor Lowther Date: Fri Jun 4 12:53:04 2010 -0500 Update help text for powersave hooks that display help. commit a69b163aa760013e5a72327e43f8ef0f21226012 Author: Victor Lowther Date: Fri Jun 4 09:38:31 2010 -0500 Add wakeonlan and pcie aspm powersave hooks. commit 21558e0ceb21620ac78f5ef81f937a404fa1abb1 Author: Victor Lowther Date: Fri Jun 4 08:18:31 2010 -0500 Add support for ext4 filesystems in journal_commit. Also force pm-utils to disable powersaving features across a suspend/resume. commit 381ff7b01f459e5767d927386dad48e52d2c5f02 Author: Victor Lowther Date: Thu Jun 3 16:30:32 2010 -0500 Add sata_alpm control hook. commit 43e64366c2c5c9831c041fb571bf7e92ad3598c2 Author: Victor Lowther Date: Thu Jun 3 15:53:24 2010 -0500 Add help and configurability to most of the powersave hooks. commit ded3b131f51ba3aa64536019c4bfb0cb7a0df58b Author: Victor Lowther Date: Wed Jul 23 21:29:27 2008 -0500 Added powersave hook to change journal commit interval commit a262ed4c23199e6c42c19dd6fea423d72b78a15a Author: Victor Lowther Date: Sat Jul 5 11:41:27 2008 -0500 Make sure that we are root before trying to run dmidecode. commit 6ff56aa5ec0aa5756162e60b26fd3cbdfb8abcfa Author: Victor Lowther Date: Mon Jun 30 19:08:44 2008 -0500 Make laptop-mode, readahead, and xfs_buffer only apply when we are running on something that looks like a laptop. "looks like a laptop" = dmidecode says that chassis type is Portable. commit 2a09b333c3096cfb0d361a983a4c479c4d54ed09 Author: Victor Lowther Date: Sun Jun 29 12:07:22 2008 -0500 More comments to the power hooks. Also added an environment variable that will (hopefully) tell us what type of system we have. commit 58379d77e02e7ed3e4d61757358fb88d7f98413a Author: Victor Lowther Date: Sun Jun 29 11:57:55 2008 -0500 Added comments to intel-audio-powersave and wireless commit 69922741b43bfcee13677ae5dce16fa274f53a9e Author: Victor Lowther Date: Sun Jun 29 11:42:16 2008 -0500 Rewrote the sched-powersave hook to eliminate redundancy. commit b58b6ef7c254bf46b0cfb909070bfb5028ac05ce Author: Victor Lowther Date: Sun Jun 29 10:40:14 2008 -0500 Power management for a couple of other subsystems commit 8aae17379df8772e46b0f28fdb4d3e974f65ad54 Author: Victor Lowther Date: Sat Jun 28 23:25:11 2008 -0500 Added some explanatory comments to the power hooks. commit 6662c9f80bc8e914e826a009cdf0755d442687c8 Author: Victor Lowther Date: Sat Jun 28 11:38:28 2008 -0500 Richard raised concerns about hard drive spindown. So the harddrive hook no longer tries to spin the drive down pending some sort of consensus on the right thing to do to make the hard drive save power. In the mean time, though, just flat-out disable write caching on the hard drive. I know that there are barriers and flushes that the ATA layer uses to ensure that data really is written to the disk, but hard drive cache isn't battery backed. commit 1ab9f81812861c9fbab59c53a1fd50b3077d6a0f Author: Victor Lowther Date: Fri Jun 27 20:02:58 2008 -0500 Added basic laptop mode support to power.d commit 9612398e36335b0358b4585ab6edd5589f9d129e Author: Victor Lowther Date: Fri Jun 4 11:13:06 2010 -0500 Add PKGBUILD for rudimentary Arch Linux support commit a4028ade02a01aff35d4968bfaeebe0748d1be98 Author: Victor Lowther Date: Mon May 31 18:52:19 2010 -0500 Autodetect sleep modules by default instead of forcing the kernel one. commit ad43a44d2f373a111c3912c4e5f65a43ab3cf65b Author: Victor Lowther Date: Mon May 31 18:28:28 2010 -0500 Make tuxonice methods chvt if using a userspace UI. Since we do not always chvt away from X before actually hibernating, things may get nasty if both X and the userspace UI start drawing. commit b669f97fd18d6de49c6b6d6a28b77d6ecb321a5f Author: Dylan Smith Date: Mon May 31 14:04:29 2010 -0500 Try falling back to standby suspend of mem is not available. It saves less power, but is the only option available on some systems. Thanks, Dylan Smith. commit 619a0a8980c6e7294ac303da7ca3b2298fbe919e Author: Victor Lowther Date: Mon Apr 12 22:07:54 2010 -0500 Make service command executable. commit ed34802c8d538ff45cb35c726d7a6a53e66c9ec2 Author: Paul Menzel Date: Mon Apr 12 15:04:01 2010 +0200 README.native-quirk-db: Typo. s/though/through/ Signed-off-by: Paul Menzel commit 0e58d64382a4efd2b1140f1fb1b3cf19043f1dd4 Merge: a1d9fde ddad23a Author: Victor Lowther Date: Mon Apr 12 22:00:09 2010 -0500 Merge remote branch 'UPSTREAM/master' commit a1d9fde306aee2d65f83c0225c65a31b5d417e10 Author: Victor Lowther Date: Mon Apr 12 21:57:23 2010 -0500 Add comments to the service command. commit c66c6f15f1ef15741842b4e573bcd9dfb28a7528 Author: Victor Lowther Date: Sun Apr 11 14:59:50 2010 -0500 Create a pm-utils local service command for distros that do not have one. commit 68104102c9d1659183fc0ad998274602802c6b41 Author: Victor Lowther Date: Sat Apr 10 15:20:48 2010 -0500 Modify make-deb to not bother with checking out the debian branch since we merged it into master commit 6bc4f4eeed002182bd4e39ee11fc024ceaf73757 Merge: 81628f1 e1fd7e6 Author: Victor Lowther Date: Sat Apr 10 15:19:05 2010 -0500 Merge branch 'debian' commit ddad23ae577a712489abbdd7e997ce4a551ea838 Author: Chase Douglas Date: Fri Mar 19 17:36:14 2010 -0400 Load hook blacklist for power.d hooks Signed-off-by: Chase Douglas Signed-off-by: Dan Nicholson commit 81628f159aa583bdba480f0537020700b3d2fb52 Author: Victor Lowther Date: Fri Mar 19 09:15:01 2010 -0500 Move .spec.in file into master. We no longer require the rpm branch, and will drop it. commit e8d0b58a9df080f021d04b4c2d358003974092f3 Author: Michal Schmidt Date: Tue Feb 23 14:57:05 2010 +0100 on_ac_power: support UPower (new name for DeviceKit-power) DeviceKit-power got renamed to UPower and its D-Bus interface changed accordingly. Try UPower first in on_ac_power. If it fails, try DeviceKit-power. It if fails too, try hal. Also update documentation. Signed-off-by: Michael Biebl commit b010efe88f668e961a4b5f99480041c3408e81b8 Author: Victor Lowther Date: Wed Mar 17 15:21:55 2010 -0500 Oops, make-rpm should be executable. commit 5315e7c7aa23b50a7a54061c91cf5ed544607b58 Author: Victor Lowther Date: Wed Mar 17 15:19:20 2010 -0500 Move make-rpm from the rpm branch to here commit 6a0f687919da4465e3b76d6947e4fde46d092194 Author: Victor Lowther Date: Wed Mar 17 15:11:30 2010 -0500 Move files instead of copyingthem when cleaning up. commit 1e9751039b6d96df6c3ea870982d092d2f69c339 Author: Victor Lowther Date: Wed Mar 17 15:06:50 2010 -0500 Clean up after ourselves properly commit e1fd7e66d35ded2a30af3b3a1f942d2e91599850 Author: Victor Lowther Date: Wed Mar 17 14:56:28 2010 -0500 Mokve make-deb to the master branch commit e950b5ffe18ad36f14acaec554becf9795233f0d Author: Victor Lowther Date: Wed Mar 17 14:55:11 2010 -0500 Move make-deb script from the debian branch to here. commit 0ed2f3950e4797c592d89dcbe9d2bc194e560a2c Author: Victor Lowther Date: Sun Mar 14 23:11:39 2010 -0500 Fix import-fdi-quirkdb Magic foo_outof regex munging code was not working due to a deplorable lack of extglob. Compaq biosen have some truly hideous identifiers. Hmmm... lenovo fdi file seems to use slightly looser XML. commit ff649497ad05fc7a7e7a2d33f7e91174f61da5ac Author: Victor Lowther Date: Sun Mar 14 21:50:14 2010 -0500 Bump docbook revision for the manpage sources to 4.5 commit 41313a747ab99b0c4cc1995c7e54cbeb185dbcbe Author: Victor Lowther Date: Sun Mar 14 21:43:39 2010 -0500 Bump revision to 1.3.0 commit 8716abfa75f0e7d227fdba1d31cd65a7b9b9348c Merge: 509f6ba 0fca81b Author: Victor Lowther Date: Sun Mar 14 21:41:53 2010 -0500 Merge branch 'master' into pm-utils-1.3 commit 0fca81b9a39b31a8103f1380953948c722e2b331 Author: Michael Biebl Date: Mon Feb 15 16:50:27 2010 +0100 Fix a small typo ('lits') in pm-action.8 Reported as Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567084 commit 916a6dc5008b51e63c1708b66eb1847c9f8dc72e Author: Michael Biebl Date: Mon Feb 15 00:38:44 2010 +0100 Small fix for 309fba58adaf8c57df6cb91411c81eae336e82dc commit 309fba58adaf8c57df6cb91411c81eae336e82dc Author: Michael Biebl Date: Wed Feb 3 22:19:31 2010 +0100 Rename, for consistency's sake commit 8fb0119543fc186786ff5dd10cccab066ede1860 Author: Rafał Miłecki Date: Wed Feb 3 21:27:27 2010 +0100 Fix typo in regexp, replacing ; char Replace all occurences of ; not only the first one Signed-off-by: Rafał Miłecki commit d1cf11b9be14dd88bc1eeb9b7cd729fbcee632f7 Author: Martin Pitt Date: Wed Feb 3 11:34:58 2010 -0800 fix alternatives matching in native quirks DB The native quirks DB separates alternatives with ';'. For regexp matching, turn those into '|', so that they will actually match. commit e5b0df69127b32f974cf9506460e7852cd25b8e4 Author: Martin Pitt Date: Wed Feb 3 11:06:17 2010 -0800 fix usage of find_native() 98-video-quirk-db-handler expects find_native() to write the quirks to stdout, so actually do write them there. This makes the native quirks work. commit 665bad4f548f19ab8706026c646e44cdab8c37f9 Author: Martin Pitt Date: Tue Feb 2 17:40:14 2010 -0800 fix DMI attribute matching canonicalize_dmivar() refused the valid property "system.firmware.release_date" because of a missing '_' in the character filter. commit 509f6badd8ffcc40bd3393d8c222ee8adacfa6b6 Author: Victor Lowther Date: Fri Dec 25 10:45:24 2009 -0600 chvt again when using nvidia binary driver Certian newer nvidia binary drivers do not chvt in kernelspace, which leads to reported lockups. Go ahead and have them chvt in userspace again. commit e0b016fd42d3e2c279f730bd0f400933267d6fdb Author: Victor Lowther Date: Sun Dec 13 20:55:02 2009 -0600 Bump revision to rc3 commit 8e4dc224482476b5f186375bedf1e4c809e4b727 Merge: 455709e a253fe1 Author: Victor Lowther Date: Sun Dec 13 20:54:03 2009 -0600 Merge branch 'pm-utils-1.3' commit a253fe1a2f1aa6b9a4cd3305c0c683efc289f824 Merge: 8cb8fb3 3aba018 Author: Victor Lowther Date: Sun Dec 13 20:53:45 2009 -0600 Merge is_set fix from 1.2 branch commit 3aba018a220356f519f1066f6116642266559028 Author: Victor Lowther Date: Sun Dec 13 20:52:05 2009 -0600 Oops, the "simple" bugfix for is_set broke everything else. commit 8cb8fb33ce7450ea975a6e51a9516e31b9b18eb8 Author: Victor Lowther Date: Thu Dec 10 23:04:23 2009 -0600 Fix silly typo in pm-action.xml commit acf18d73b52a8b0b3b37746ced5e699b0fe79577 Author: Victor Lowther Date: Thu Dec 10 23:02:25 2009 -0600 Bump to pm-utils-1.3.0-rc2 commit 7897b32ab1a3878a053e800bf314911d8d56a803 Author: Victor Lowther Date: Thu Dec 10 23:01:31 2009 -0600 Bump to 1.2.7-rc1 commit 455709ea9df7e64cc0d29e18d0cdf0735bb69613 Merge: 8680e68 da03ab1 Author: Victor Lowther Date: Thu Dec 10 22:59:25 2009 -0600 Merge branch 'pm-utils-1.3' commit da03ab146c022b685b096ed7fe118eb4bb29ee6e Author: Victor Lowther Date: Thu Dec 10 22:57:00 2009 -0600 Use --quirk-test to override the usual sanity checks. This can be useful for testing to see if your system requires an unusual set of quirks, but can also make your system crash in new and exciting ways across suspend/resume. You have been warned. commit d92323cbcb3c35896cc2969ff2fa9cb1d8365361 Author: Victor Lowther Date: Thu Dec 10 22:40:58 2009 -0600 Update 98-video-quirk-db-handler to reflect recent bug fixes Some longstanding typos in the quirks were fixed in 98smart-kernel-video. Update the new quirk handling machinery to take those fixes into account. commit 03b34a925efebf3cc98939cfbb8e58a4408b5f93 Merge: d1ebbc4 2c79827 Author: Victor Lowther Date: Thu Dec 10 22:37:05 2009 -0600 Merge branch 'pm-utils-1.2' into pm-utils-1.3 Conflicts: pm/sleep.d/98smart-kernel-video commit 8680e685ab091d74eb5063393806a3a3f1894f5d Merge: f3886ca 2c79827 Author: Victor Lowther Date: Thu Dec 10 22:36:18 2009 -0600 Merge branch 'pm-utils-1.2' commit 2c7982708aea4296cdd238b224fc9b0b99f117b8 Author: Christian Krause Date: Thu Dec 10 22:34:14 2009 -0600 Fix pci-save vs save-pci related typos - fix wrong function calls to pci_restore and pci_save which did not match the actual defined functions (restore_pci and save_pci) - use the correct quirk parameter in "remove_paramters" (use --quirk-save-pci instead of --quirk-pci-save) commit 7f1732c08db46d76692cb2860c38d5e6d3987cc8 Author: Tormod Volden Date: Thu Dec 10 21:58:38 2009 -0600 [PATCH] Fix vga-mode-3 typo in video hooks We have been using vga-mode3 while the standard says vga-mode-3. This might fix (or even break) some resume issues on hardware which did not have any video quirks, since the option is set in fdi/information/10freedesktop/99-video-quirk-default.fdi from hal-info. http://bugs.freedesktop.org/show_bug.cgi?id=25334 Signed-off-by: Tormod Volden Signed-off-by: Victor Lowther commit 74ddb985b306c83db3fcd70605b0901b2a8309d6 Author: Victor Lowther Date: Thu Dec 10 21:39:01 2009 -0600 Fix bug# 25547, make pm-action options formatting correct. commit d1ebbc409abd43c1b8a96640516aff48f2492027 Author: Victor Lowther Date: Mon Dec 7 19:10:55 2009 -0600 Updated pm-action documentation to describe the new return values. commit 09da44bedc97ddd75e77ed87b7a057dc21e01a38 Author: Victor Lowther Date: Mon Dec 7 19:02:35 2009 -0600 Track suspend/hibernate failures and exit accordingly. It turns out that echo whatever >/sys/power/state will fail if transitioning to that state fails. If transitioning to the reuested power state fails, pm-action will return an error code greater or equal than 128. commit f7df23f2928f63c38ef4b307b4312787f1a715bc Author: Victor Lowther Date: Sun Dec 6 13:32:33 2009 -0600 Resolve bug# 25427 commit 57ff1f997d6297557340057e9fdbb2f956b31aa0 Author: Victor Lowther Date: Sat Dec 5 21:50:19 2009 -0600 Update revision to reflect rc status, and make manpage actually build. commit ab89e5758bc07d1506050d97b4d9ff5a051b6681 Author: Victor Lowther Date: Sat Dec 5 21:29:01 2009 -0600 Update import-fdi-quirkdb to make it a little more flexible. It now takes two optional arguments -- $1 is the location of the .fdi quirks, and $2 is the place to put them. commit 946ba5c8fa6e1d46b0bb205a0b2a98cc4261a480 Author: Victor Lowther Date: Sat Dec 5 12:02:18 2009 -0600 Add reference to README.debugging in the pm-action manpage. commit 00a867384055d98b6431ffca86ac664b2cacf614 Author: Victor Lowther Date: Sat Dec 5 11:52:56 2009 -0600 Bump revision number to 1.3.0 commit c016155ca72c86bfefe397de4310f53566a1c246 Author: Victor Lowther Date: Sat Dec 5 11:51:33 2009 -0600 Updated pm-action manpage to reflect recent changes. We have --store-quirks-as-lkw instead of --store-quirks-as-fdi, and the default kernel methods have a suspend-hybrid implementation that has a 900 second delay between suspending and hibernating. commit cc971769598b08e8a29b5319048c59c41a0b2f2f Merge: 71c88ca 8cadf34 Author: Victor Lowther Date: Sat Dec 5 11:11:01 2009 -0600 Merge branch 'profiling-support' into native-quirk-db commit 71c88ca37b0be0ad35555c53e4e059f014592eff Merge: c6b37b9 f3886ca Author: Victor Lowther Date: Sat Dec 5 11:10:50 2009 -0600 Merge branch 'master' into native-quirk-db commit c6b37b9a0d5f12b7067bf24627af19fed6bcde5a Author: Victor Lowther Date: Tue Dec 1 20:39:03 2009 -0600 Oops, spell nouveau correctly. commit f3886cadd361f9f1659c2f555e5a0e74ed9422b6 Author: Victor Lowther Date: Tue Dec 1 12:35:04 2009 -0600 Add support for hibernate after suspend. Do this by adding a default suspend_hybrid sleep method. With the default settings, we schedule an alarm for 15 minutes from now, suspend, and hibernate if we wake up in 15 minutes. commit 51f39d7b0e2b4b639392dc64c17fece0f972c085 Author: Victor Lowther Date: Tue Dec 1 10:52:47 2009 -0600 Oops, actually cache the dmi variables again if we need to update the last known working quirk. commit 9b2e067bedd6d3f5351e6849b7d371fa1c9accda Author: Victor Lowther Date: Tue Dec 1 00:30:04 2009 -0600 Add some documentation on native quirk handling. Also add the functionality the documentation mentions. commit 6a47db417d37828389cdaaf68818478ca0a51ec8 Author: Victor Lowther Date: Mon Nov 30 22:50:39 2009 -0600 Clean up on_ac_power modifications. Ugh, backticks. commit 557b67691b14c580e57cdefbf9faf2852c1e6c77 Merge: 8b08ffd f323e2c Author: Victor Lowther Date: Mon Nov 30 22:42:39 2009 -0600 Merge branch 'master' into native-quirk-db Conflicts: pm/sleep.d/98smart-kernel-video 98smart-kernel-video no longer exists, but we want the other fixups in the master branch. commit 8b08ffdb3cf8ecce10309d7149474797832631d2 Author: Victor Lowther Date: Mon Nov 30 18:18:31 2009 -0600 Some final fixups to make the built-in video quirk database handling work. commit 591d9757685ae95795dbdc9fb3958325c2fab962 Author: Victor Lowther Date: Mon Nov 30 17:46:26 2009 -0600 Oops, forgot up update Makefile.am commit f323e2cf2eddd683721be4eadbdc82f0454e7190 Author: Martin Pitt Date: Wed Nov 25 12:37:57 2009 +0100 some documentation updates for DeviceKit-power https://bugs.freedesktop.org/show_bug.cgi?id=25274 commit c7df9ec51d914ff06007414651c89750dbdb3745 Author: Martin Pitt Date: Wed Nov 25 12:35:28 2009 +0100 pm-functions.in: Drop $CHASSIS_TYPE $CHASSIS_TYPE is not used anywhere in pm-utils itself, nor any third-party pm-utils hook that I can see. It relies on a dmidecode map in hal which has never really been robust, and it just seems generally obsolete nowadays. Let's not proliferate that any further and just remove it entirely. https://bugs.freedesktop.org/show_bug.cgi?id=25274 commit 7cf2894a69cb5627fd9949bf065cb1c631b84bc5 Author: Martin Pitt Date: Wed Nov 25 12:31:34 2009 +0100 on_ac_power: DeviceKit-power support Try to contact DeviceKit-Power in on_ac_power, and if it succeeds, use that. Otherwise fall back to hal. https://bugs.freedesktop.org/show_bug.cgi?id=25274 commit 738bfc88110d0f0a7a64b754875358a1a870bded Author: Michael Biebl Date: Mon Nov 30 09:51:41 2009 +0100 Fix a typo in have_kms The nvidia driver is called "nouveau", not "noveau". Thanks to Julien Cristau for spotting this. commit ea9c198040f9b70f474ef8297e227e70f56aa505 Author: Victor Lowther Date: Mon Nov 16 11:07:39 2009 -0600 Actaully add the new .fdi importing script. commit c4f1ddf6b31dc24e0181dea1d0495fc359f4d2d9 Author: Victor Lowther Date: Mon Nov 16 11:07:08 2009 -0600 Extract out the bits that handle translating .fdi files into their own script. Integrating video quirk db handling into pm-utils requires splitting out database querying from database importing anyways. commit 281bcef4c81e4a9751923bb6ea64669d1f9aba5d Author: Victor Lowther Date: Mon Nov 16 10:30:10 2009 -0600 Start merging native quirk handling functionality into pm-utils commit 018525d16a874dac627d780e8ac6928ace702d60 Author: Victor Lowther Date: Sun Nov 15 22:30:50 2009 -0600 Make pm-utils handle video quirks natively Add video-quirk-db-handler, which knows how to read the video .fdi files, translate them into a native format, and use that native format to find the appropriate quirks for a given system. This hook replaces 00auto-quirk and 98smart-kernel-video. commit dc0963283565bd67154ed8584f8c3f28b43b3807 Author: Victor Lowther Date: Thu Nov 12 21:28:55 2009 -0600 Bump to 1.2.6.1 Oops, broke smart non-KMS modesetting for Intel. commit 067ab317cee676d523d1954d1aeb04a6cc8df139 Author: Victor Lowther Date: Thu Nov 12 21:26:22 2009 -0600 Add back have_smart_intel We still need to consider the case where i915 is used with modesetting disabled. So revert the have_smart_intel removal in 504faf0a0c31cbdbc03a608cf633d58f12e49eb7. Thanks, mbiebl! commit 898b46860ad7aa509098e3e454e30c2f3d7b4dea Merge: aa049b6 f66bfc9 Author: Michael Biebl Date: Sun Nov 8 17:10:57 2009 +0100 Merge branch 'master' into pm-utils-1.2 commit f66bfc9193862450c64deb55c063171ec3985522 Author: Michael Biebl Date: Sun Nov 8 17:09:19 2009 +0100 Fix typo in pm-action.8 Patch by Mario Lang. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540122 commit 3dfbf269209ee4e1252d5de6cd2fe4ea78d91d68 Author: Michael Biebl Date: Sun Nov 8 17:05:18 2009 +0100 Don't err out in maybe_deallocvt if there is no console state kpowersave pops up a window telling that an error "1" has occurred when suspending to ram. The error "1" message is annoying and lacks meaning to the user. It's caused by maybe_deallocvt returning the ret_val of state_exists when the tested (here: console) file isn't found. This absence of this file seems not to do any harm therefore the escalation of the ret_val 1 is deprecated. Solution: just tell maybe_deallocvt to return 0 in the above case. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554959 commit aa049b6e8d757579c2727a63fd09ee80c3a30ea4 Author: Victor Lowther Date: Sat Nov 7 23:52:33 2009 -0600 Bump version number to 1.2.6 commit 51afe0cac4d540116c48949f65e16c141d6b0ade Merge: 054668a 6014e54 Author: Victor Lowther Date: Sat Nov 7 23:51:04 2009 -0600 Merge branch 'master' into pm-utils-1.2 commit 6014e54b7f007109616965ff601ff05ea6fc397a Merge: 504faf0 6691c51 Author: Victor Lowther Date: Sat Nov 7 23:26:39 2009 -0600 Merge commit 'remotes/UPSTREAM/master' commit 504faf0a0c31cbdbc03a608cf633d58f12e49eb7 Author: Victor Lowther Date: Sat Nov 7 23:21:45 2009 -0600 Make kernel modesetting detection a little smarter. It turns out that the method we were using to detect kernel modesetting support was not very accurate. It turns out there is no bulletproof way for us to tell if KMS is being used, but Michael Biebl found a way that sucks less than out current method. Hopefully the framebuffer drivers will grow a flag in sysfs somewhere that tells us that KMS is in use. commit 6691c51d58951c328e08e50087b354ceb2c4f3db Author: Michael Biebl Date: Mon Jul 6 20:22:52 2009 +0200 Revert "Fix a bashism ('==')" This reverts commit f3821f3479a58a8453bf9219fb5933fd99b5c1a8. The fix was actually bogus and a false-positive of checkbashisms. commit f3821f3479a58a8453bf9219fb5933fd99b5c1a8 Author: Michael Biebl Date: Wed Jul 1 17:33:08 2009 +0200 Fix a bashism ('==') See Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530164 commit d517615e97a4180854418369b54a65adfed6ddca Author: Michael Biebl Date: Wed Jul 1 16:52:54 2009 +0200 Fix syntax for shell configuration variables. See Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=528726 commit 7c6748634774dc97049d9c6a38633b9983a10435 Author: Michael Biebl Date: Wed Jul 1 16:51:52 2009 +0200 Update comment to reflect current state commit b01d306fbba7dd8d7ab68a5a8c850472e9273277 Author: Victor Lowther Date: Sat Jun 13 21:01:17 2009 -0500 Make is_set checking more explicit If is_set is not one of the usual boolean values, return 2. commit f66326636dd93afc115c64fc3320a6c2ef424a22 Author: Victor Lowther Date: Wed May 6 18:34:11 2009 -0500 Update places where we check for booleans to use is_set Suprisingly, there are not that many. commit 2daad8297459f68fc5ad0fd4b0a2aa8ba918621d Author: Victor Lowther Date: Wed May 6 18:14:07 2009 -0500 Add is_set function to make checking boolean variables easier. The definition of a boolean variable is one that is set to "true", "yes" "1", or that is set to the null value. commit c66b32116b95a22beea22a9210241cf5244b3e47 Author: Michael Biebl Date: Thu Apr 23 17:15:33 2009 +0200 Fix a few typos in the documentation See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525253 commit e5cdb5bb6a573a36b0c872c889c8b8f25009cc45 Author: Michael Biebl Date: Fri Apr 17 00:23:46 2009 +0200 Fix typo in have_kms() The function is correctly called add_parameters. Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524243 commit 054668a461347514034b88eef24f902b69d55d5b Merge: e6fd079 46e3db3 Author: Victor Lowther Date: Sat Apr 11 07:45:20 2009 -0500 Merge branch 'master' into pm-utils-1.2 commit 46e3db3d321579217edbea90c1ddf6f98ea1f38b Author: Victor Lowther Date: Sat Apr 11 07:43:58 2009 -0500 Use sched_smt_power_savings. There is no sched_smp_power_savings tunable. Thanks, Michael Biebl! commit e6fd0796858826bfc4404672d0234fb15789f8f2 Author: Victor Lowther Date: Fri Apr 3 13:49:15 2009 -0500 Bump revision number commit ab9399236ff33e9b22dbc18d01566609689c859a Merge: 813c1e4 11176a7 Author: Victor Lowther Date: Fri Apr 3 13:48:21 2009 -0500 Merge branch 'master' into pm-utils-1.2 commit 11176a7d37f6a0854c8d9e338d972299589788dd Author: Victor Lowther Date: Fri Apr 3 13:42:01 2009 -0500 We should not need to chvt when suspending using KMS commit a79d16300c662080caf1775f1cf68f1be4049716 Author: Victor Lowther Date: Fri Apr 3 13:39:55 2009 -0500 Add KMS support to 98-smart-kernel-video Also factor some things out to make 98-smart-kernel-video shorter. commit 584f08dc12fada69dbe1948a61cfc4b179b40eda Author: Victor Lowther Date: Fri Apr 3 13:27:56 2009 -0500 Move chvt handling into 99video This prepares for adding kernel modesetting support. commit 813c1e4e07b9a1ccd887c0eacdb714cf5715fd5c Author: Victor Lowther Date: Sun Feb 8 17:23:37 2009 -0600 Bump version number for pm-utils 1.2.4 commit 4755f6754b1a80db775676f7d485da0ee725a0c1 Author: Victor Lowther Date: Fri Jan 30 04:51:50 2009 -0600 Make CHASSIS_TYPE always have Unknown if we cannot determine the chassis type. commit 328c2016b4adf0fc04de43f79c66c1477abdae3f Author: Victor Lowther Date: Mon Jan 26 06:50:13 2009 -0600 Resolve fd.o bug# 19658 modunload was not unloading dependent modules correctly due to incorrect string handling. Fix provided by zak.kipling@cantab.net. commit 67ac2ed11b44df8f5405ee1c424f2073193aca5e Merge: cdf3765 df99431 Author: Victor Lowther Date: Mon Jan 26 06:24:33 2009 -0600 Merge commit 'UPSTREAM/master' commit df99431ba8ee5a2a5b552f32950ae98eec9757d2 Author: Dan Nicholson Date: Sun Jan 18 11:20:47 2009 -0800 Match gentoo message "started" when checking for running services Gentoo uses the convention of printing the message "started" when showing the status of services. Augment stopservice() to check this in addition to "running". This also drops the unnecessary -c argument from the grep command. Signed-off-by: Dan Nicholson commit cdf37656b3835da0c8476460076b03785e0b9758 Author: Victor Lowther Date: Mon Dec 15 13:55:32 2008 -0600 Fix broken quirk handling introduced by auto-quirk debugging change. commit 8cadf34e33592697a2fca23b81f3ce640c79e762 Author: Victor Lowther Date: Sun Dec 14 13:36:16 2008 -0600 Document PM_DEBUG and PM_PROFILE commit 3ee39985a78ee89bae1f4c7e7865398c12ca1558 Author: Victor Lowther Date: Sun Dec 14 13:33:16 2008 -0600 Profile run_hooks as well as each individual hook commit 16531c217d0f2492d431b7f5db6c2e7b012ab648 Author: Victor Lowther Date: Sun Dec 14 12:15:29 2008 -0600 Factor out run_hook to make profiling easier commit c992f07b11dc5d77dd3de25607a7a66f1b289fd8 Author: Victor Lowther Date: Sun Dec 14 12:00:53 2008 -0600 Add a profile function wrapper. This makes it easier to profile suspend/resume. The profile function should work on any callable item. commit 68e38d6e7746fe8d36d80f5b85d5b704bf49bcf2 Author: Victor Lowther Date: Mon Dec 15 06:08:22 2008 -0600 By default, pm-powersave does nothing with laptop-mode. So dpn't even mention it in our manpages. commit 265fcd57fe3d09062722a7e26bde07c2851fcc1f Author: Victor Lowther Date: Sun Dec 14 21:53:34 2008 -0600 Echo the quirks we got from HAL in 00auto-quirk. This will make pm-utils slightly easier to debug. Thanks, Michael Biebl for the idea. commit e3c0135899e8f1b9c27333d4641dabf9c1a562cf Author: Victor Lowther Date: Sun Dec 14 15:46:39 2008 -0600 hal-get-porperty runs just fine as a normal user commit 2c89b8f30b1d28ad98d17783ec6c75e27c5b7514 Merge: 6f9cbbf 41be1ba Author: Victor Lowther Date: Sun Dec 14 13:37:04 2008 -0600 Merge branch 'pm-utils-1.2' commit 41be1ba0668222efd6b3861ce2edaf1398a40364 Author: Victor Lowther Date: Thu Dec 11 11:06:08 2008 -0600 Fix silly typo in pm-utils.pc.in. Thanks, Robby! commit 6f9cbbf628bb19f488695e7fa6c5d63d24a2eaa7 Merge: 3dc0090 74abfd9 Author: Victor Lowther Date: Thu Dec 11 10:06:13 2008 -0600 Merge branch 'pm-utils-1.2' commit 3dc009097307409f9f44522e5ece9b9f2d1bec3b Author: Victor Lowther Date: Thu Dec 11 10:04:50 2008 -0600 Export the default config dir using pkgconfig. commit 74abfd91d9aba25f1b5b8c3b9a238b426470b6e2 Author: Victor Lowther Date: Fri Dec 5 06:15:49 2008 -0600 Do not try to make removed hooks commit 2c253a933218e5256427bf84460e1060b3dc0f0e Merge: f0cf3ad 89c71b6 Author: Victor Lowther Date: Wed Dec 3 13:09:46 2008 -0600 Merge branch 'master' into pm-utils-1.2 Conflicts: configure.ac commit 89c71b6e409194cb18a5a6cf6b358d2f36957ffd Merge: fbf72f5 618110a Author: Victor Lowther Date: Wed Dec 3 13:06:54 2008 -0600 Merge branch 'maybe-pm-utils-1.2.3' commit 618110a72da2c22e50e3a6324be2332699103cca Author: Victor Lowther Date: Mon Dec 1 09:26:12 2008 -0600 Updated NEWS with major items for the 1.2 series. commit db9fd15445ee7c2eeb873b06cf89da15442d8e67 Author: Victor Lowther Date: Sun Nov 30 10:19:24 2008 -0600 Added notes on how to minimized user impact. After all, user perception of these things is our reality. commit 7dd6fe1ae1da23e5c051ca175b2834c5e5eef7ae Author: Victor Lowther Date: Sun Nov 30 08:19:00 2008 -0600 Add more comments to uswsusp since it is being used as an example in documentation commit 0ef31524b229174b02c51d2134b4f56636c590db Author: Victor Lowther Date: Sun Nov 30 07:51:37 2008 -0600 Describe stackable sleep modules in HOWTO.modules. commit 3e72a7a5adb9d3b69d45dda327ed5bde5ad2eabc Author: Victor Lowther Date: Sun Nov 30 09:51:38 2008 -0600 Drop 50ntpd ntpd operates normally over a sleep/wake cycle. Stoppping and restarting it in a sleep hook is too adhoc. If it is essential that ntpd be stopped and restarted, then having NetworkManager do the job when interfaces go offline and come back online is a better way to do things. commit d4c9650d3476643454c282b082fa45820f4d72ac Author: Victor Lowther Date: Sun Nov 30 15:55:36 2008 -0600 Drop 65alsa -- it is useless by itself. alsa drivers that support suspend/resume will save their state without it. alsa drivers that don't will need to be unloaded and reloaded as well as having their state saved and restored to work properly. See thread at http://mailman.alsa-project.org/pipermail/alsa-devel/2008-November/013030.html commit 3df57b4fbce6243f27d6cbf99f53034f862a9a6e Author: Victor Lowther Date: Sun Nov 30 08:37:20 2008 -0600 Support Slackware init system. commit 493224b1beeac0154807bcb1ac8a3007a46c435b Author: Victor Lowther Date: Fri Nov 28 16:15:15 2008 -0600 90clock takes over a second to run on suspend. Most systems do not need it. Add NEED_CLOCK_SYNC, and only run hwclock if it is set. This will probably go away entirely in a later release. commit 6eb53f4de576e9a569d9019f3398c23438c2cfa5 Author: Victor Lowther Date: Sat Nov 29 08:52:41 2008 -0600 Bump revision number commit 199a735563e7f1f7146b1c0c7eb1fc3aa854a956 Author: Victor Lowther Date: Sun Nov 30 18:19:12 2008 -0600 Remove 55battery HAL has handled rescanning the batteries since mid 2006. commit 2886a5de8fad097e21d4edb75de1eafecf70e718 Author: Victor Lowther Date: Mon Oct 20 21:28:18 2008 -0500 Modified pm-utils.pc.in to make autoconf intergration easier This adds pm_sleephooks, pm_powerhooks, and pm_sleepmodules to the values that pkg-config can return. commit fbf72f5fd7a685c79c858e2e400096fb65a8667e Author: Victor Lowther Date: Sat Nov 29 08:52:41 2008 -0600 Bump revision number commit 290fb463ea2d9628a1b724d83d34a96c84b025c6 Author: Victor Lowther Date: Fri Nov 28 16:53:37 2008 -0600 Don't try to build 55battery anymore commit 74aead833bfc3ea7429e15938f7f836f0eb5f010 Author: Victor Lowther Date: Fri Nov 28 16:15:15 2008 -0600 90clock takes over a second to run on suspend. Most systems do not need it. Add NEED_CLOCK_SYNC, and only run hwclock if it is set. This should eventually turn into a quirk. commit 6e577968119b8997233b98620dd5a740c16d2412 Author: Victor Lowther Date: Thu Nov 27 07:59:02 2008 -0600 HAL has handled this since mid 2006. commit ab813bbbc25a88c726045b53d97b3a776f0a726c Author: Victor Lowther Date: Wed Oct 29 14:30:15 2008 -0500 Added dbus_send helper function. This function works just like dbus-send, but returns $NA if the command fails for any reason. Also modified hooks to use dbus_send where applicable. commit 6c9f2959a36e608e4d1f71230a9eaaa77940c54e Author: Michael Biebl Date: Tue Oct 7 03:23:25 2008 +0200 Reset acpi_video_flags before suspend. If no --quirk-s3-* option is passed to pm-suspend, set acpi_video_flags to 0. This allows to reliably test different set of quirks and clears any flags that were set via the kernel boot option. We deliberately ignore the kernel acpi_sleep option, quirks should be set via HAL. commit f0cf3adb37fd06e7cbb882c9ab4ba35da28a3531 Author: Victor Lowther Date: Mon Oct 6 05:51:57 2008 -0500 pm-utils-1.2.2.1 commit 61656ae7d8404796354bf24200c75105d5ec6be7 Author: Michael Biebl Date: Mon Oct 6 05:49:03 2008 -0500 One last cleanup in 00auto-quirks commit 8bb909029274930145aaa99b4b8b5447fcf323de Merge: 78c842d 383ee6c Author: Victor Lowther Date: Sun Oct 5 20:53:06 2008 -0500 Merge branch 'master' into pm-utils-1.2 commit 383ee6cc45b56086e7e5ea8846a1c0adae3cc035 Author: Victor Lowther Date: Sun Oct 5 19:35:14 2008 -0500 Do not save quirks if we were inhibited. commit 8125023126e165ecbe5bd01495ac30bfd94273b6 Author: Victor Lowther Date: Sun Oct 5 19:17:08 2008 -0500 --store-quirks-as-fdi, not --save-quirks-as-fdi commit 78a6575ae849858eb822655dd363887cfd8a8162 Author: Victor Lowther Date: Sun Oct 5 18:42:00 2008 -0500 Document sleep module fallback behaviour in pm-action man page. commit 1fe13fe144d26cf827cc06b2ba164541cd4e29e9 Author: Victor Lowther Date: Sun Oct 5 18:39:13 2008 -0500 Document hook ordering convention in the pm-action man page. commit 226914884fba883682fa60a40bebb3873ecde927 Author: Victor Lowther Date: Sun Oct 5 17:41:35 2008 -0500 Document --auto-quirks and --save-quirks-as-fdi in the pm-action man page. commit 7fa3f446439de179ae4d4bf73481e785b93fba34 Author: Victor Lowther Date: Sun Oct 5 17:17:21 2008 -0500 Always reset acpi video flags in 99video on resume commit 483cefcf0f7a9f3091bd03c7be52085f80134842 Author: Victor Lowther Date: Sun Oct 5 17:12:39 2008 -0500 Numbers are also valid in quirks from lshal. commit 78c842d66e376461206947ac53d3976f68afdc7f Author: Victor Lowther Date: Sun Oct 5 10:57:22 2008 -0500 Bump revision number to 1.2.2 commit baa95d0f6f5fac987c85303f158accf17bcdbd8c Merge: d156e93 f90faf9 Author: Victor Lowther Date: Sun Oct 5 10:55:48 2008 -0500 Merge branch 'master' into pm-utils-1.2 commit f90faf9293b1dddba7fe6da2a22398e8b84e51cc Author: Victor Lowther Date: Sun Oct 5 09:27:25 2008 -0500 Fix incomplete renaming of _METHOD to _MODULE commit 806df338c05a972cb53de1c372e829f9f61fedd3 Author: Victor Lowther Date: Sun Oct 5 09:09:39 2008 -0500 Fix stupid thinko in has_parameter commit f7d7d72439101083925fccd7825fd711e790c4e0 Author: Victor Lowther Date: Sat Oct 4 21:21:29 2008 -0500 Do not save generated .fdi in /tmp Instead, save them in /etc/hal/fdi/information. Closes an airline-plot potential DoS attack. commit d156e9312ea5c2fecb3d9ada08c3746012361550 Author: Victor Lowther Date: Fri Oct 3 21:17:53 2008 -0500 Bump version to 1.2.1 commit 0f7d491ad9574e730b0bd0ea14b003f7a0917205 Merge: 969e565 390d301 Author: Victor Lowther Date: Fri Oct 3 21:16:25 2008 -0500 Merge branch 'auto-backend' into pm-utils-1.2 commit fe5fc86b7e4f03cb11f291433fd9479951eedfb7 Merge: 5e629b5 969e565 Author: Victor Lowther Date: Fri Oct 3 21:14:45 2008 -0500 Merge branch 'auto-quirks' commit 969e565492b096d578c7a22c683dc67a6d14613d Author: Victor Lowther Date: Sat Sep 27 12:44:24 2008 -0500 Fixed typo in 00auto-quirk commit 5e629b56b92eb87da207d4d2c942492d87d425fa Merge: f9570ff ba5e251 Author: Victor Lowther Date: Sat Sep 27 08:43:31 2008 -0500 Merge branch 'auto-quirks' commit f9570ff8a38aeffb21fd9d6a525dbad7dc5098fb Merge: 268ad38 390d301 Author: Victor Lowther Date: Sat Sep 27 08:43:04 2008 -0500 Merge branch 'auto-backend' commit 268ad38428662c410c7c70ccf561dab8ee6ecd50 Author: Victor Lowther Date: Sat Sep 27 08:42:27 2008 -0500 Use hal-get-property instead of dmidecode to get the chassis type. commit 390d3019c38e917d3baf9eea8209c54e4970fc5a Author: Victor Lowther Date: Thu Sep 18 11:22:37 2008 -0500 Forgot to change sleep_method_help in pm-action.in commit 2fa2d36dd1cbd92f48de75782e4f5f7eca0b668b Author: Victor Lowther Date: Wed Sep 17 21:59:51 2008 -0500 Impliment module autoloading. We can now autodetect the proper sleep methods, and the sleep modules are stackable. commit fc06462ba70a260cad0a4cb6c0d2fc9aa5ce3aea Author: Victor Lowther Date: Wed Sep 17 21:52:13 2008 -0500 Always fall back to kernel methods for suspend and hibernate. That way we have a method of resilience in the case of misconfiguration, and future sleep methods do not have to reimplement the kernel methods. commit 04d25924f782d96ef55f164aea55e3d227a8a3ec Author: Victor Lowther Date: Wed Sep 17 21:41:26 2008 -0500 Move the check_ functions to pm-functions. Also conditionalize the do_ functions in the sleep modules. Now, we only declare the actual do_ functions if the system can in fact sleep using the requested method. commit 38a9d169b831aa1528a47060612cba3dd5ff3514 Author: Victor Lowther Date: Wed Sep 17 19:47:17 2008 -0500 Make per-module help and before_hooks methods stackable. This will help with making the sleep methods stackable and autodetectable. commit 982784806793454ea3b87babb3b399d98c8d1639 Author: Victor Lowther Date: Wed Sep 17 19:29:35 2008 -0500 Determine what sleep method we will try before sourcing pm-functions Lays some groundwork for allowing autodetect of sleep methods. commit 15c62582af5193f10fb7e612c2b1abb8072f793f Author: Victor Lowther Date: Wed Sep 17 19:19:18 2008 -0500 Modified pm-pmu to take a --check parameter This allow us to check and see if suspending via pmu will do The Right Thing before actually performing a suspend via pmu. commit ba5e251fe28691a359660f0dfdd229a2f6089524 Merge: f30564b 285ed3d Author: Victor Lowther Date: Sat Sep 13 04:19:41 2008 -0500 Merge branch 'auto-quirks' commit f30564ba387d06df3428a16d5bd8664e35d16dae Merge: dd430a0 c6a445d Author: Victor Lowther Date: Sat Sep 13 04:16:38 2008 -0500 Merge branch 'handle-pci-save' commit 285ed3d355956513ecb8509ef931860221aadd25 Author: Victor Lowther Date: Wed Sep 10 22:04:04 2008 -0500 Make 00auto-quirk fail gracefully if HAL is not there. commit abcd57e9730613bf08d75498fa348266a93f49b0 Author: Victor Lowther Date: Wed Sep 10 17:25:43 2008 -0500 Use has_parameter instead of manually looping over parameters. commit 1f8e1bfb8b212d2edaf1f0bfd1a18aac23797cd5 Merge: 5c193b1 dd430a0 Author: Victor Lowther Date: Wed Sep 10 17:21:09 2008 -0500 Merge branch 'master' into auto-quirks commit dd430a021b2d413a1b6ffc8e9fbe104b2f72f35f Author: Victor Lowther Date: Wed Sep 10 17:19:19 2008 -0500 Add a little helper function to test for a single parameter. commit 5c193b1c9e24224f80cf59a8dd55f58e6b656fb8 Author: Victor Lowther Date: Wed Sep 10 12:57:43 2008 -0500 Update TODO for --auto-quirk and --store-quirks-as-fdi We can grab quirks from HAL, and we know how to save quirks to a .fdi file. commit 30572ed0fdfc2522ce64d10148cd7f74b97e56eb Author: Victor Lowther Date: Wed Sep 10 12:56:03 2008 -0500 Added support for saving quirks to a .fdi file We probably collect too much information here, but too much is better than not enough. commit 0497c019ed8e49e8f1f4e39a8d934c56f754622c Author: Victor Lowther Date: Wed Sep 10 10:46:36 2008 -0500 Describe DWIM functionality in auto-quirk help. commit c768a36e484b917187b88069eb530c240b87083c Author: Victor Lowther Date: Wed Sep 10 10:34:51 2008 -0500 Fix logging bug that was aborting help after the first hook. commit ef78d2649b9a6a8b7745241f7ad1b8416f017a7f Author: Victor Lowther Date: Tue Sep 9 21:31:53 2008 -0500 When pm-action is invoked without any parameters, grab them from HAL This adds a bit of DWIM to pm-suspend and friends. commit 8a46966d6ea9329fba27f9eb3bfeaf298a419b36 Author: Victor Lowther Date: Tue Sep 9 21:13:49 2008 -0500 Add help to 00auto-quirk Also fix a silly typo commit 9197b4173c308bcdcc9b5f8a4f8b95146e634833 Author: Victor Lowther Date: Tue Sep 9 21:07:45 2008 -0500 Automagically grab quirks from HAL To use this functionality, run pm(suspend|hibernate|suspend-hybrid) with --auto-quirks. commit c6a445deed2ad7321d6707a328eba0cd67639104 Author: Victor Lowther Date: Tue Sep 9 15:11:29 2008 -0500 Updated 98smart-kernel-video to be aware of new quirks Are the kernel video drivers spart enough to handle no-fb and pci-save? Only time will tell. commit 7da41036e8c8555fea8eeddfa66307d798bcf87d Author: Victor Lowther Date: Tue Sep 9 14:48:56 2008 -0500 Added support for the nofb and pci_save HAL quirks. Right now there are no entries in any of the .fdi files that specify use of these quirks, which is why they were probably never implemented in pm-utils. commit 6ab65e737b0d70c97cabb4cd795909115cbd7591 Author: Victor Lowther Date: Sun Sep 7 09:22:59 2008 -0500 We handle hook failure and suspend_hybrid correctly now. Delete those sections from the TODO commit 9dc773bafb1354cb4ffbc31dc364817aca57ca41 Author: Victor Lowther Date: Sun Sep 7 08:39:21 2008 -0500 pm-utils 1.2.0 This release brought to you by Penelope Lowther, who is 4 weeks old today. commit 113024e1bb6a12a667666d912123ecbd9a9ee984 Author: Victor Lowther Date: Fri Jul 25 07:47:19 2008 -0500 First pm-utils 1.2.0 release candidate commit 1125407844a46363a5ba8d4cf474de5cd8231431 Author: Victor Lowther Date: Wed Jul 23 08:07:25 2008 -0500 Also missed a ;; commit c91083f2a91b006ad19e853eb0d19f1263aef050 Author: Victor Lowther Date: Wed Jul 23 08:04:16 2008 -0500 Missed a close brace commit 6f9cf1aa9780a1413ab16f71bae1cb27ae0ae8a2 Author: Victor Lowther Date: Wed Jul 23 07:59:50 2008 -0500 Depend on xmlto instead of docbook-utils when building commit 3fec4c5c285fcb0eaad6de6dae3c4132e860944e Merge: 6ec54f8 6aea272 Author: Victor Lowther Date: Wed Jul 23 07:29:54 2008 -0500 Merge branch 'pm-utils-1.1' into pm-utils-1.2 Conflicts: configure.ac pm/sleep.d/98smart-kernel-video commit 6aea27259e25958bedfc352398128ca93de10e49 Author: Victor Lowther Date: Mon Jul 21 23:20:15 2008 -0500 Greatly expanded the 98smart-kernel-video hook. Each intelligent driver gets its own section, and we no longer remove s3-bios and s3-mode quirks if we are using Intel kernel modesetting. commit 6ec54f84dd4dcc0ed1f670cdcb1894f4ed6a6239 Merge: f76baff 873733d Author: Victor Lowther Date: Thu Jul 10 13:49:34 2008 -0500 Merge branch 'two-parameter-sleep-hooks' commit f76baff97225aa45221d553b7541d3e4db953a04 Author: Victor Lowther Date: Sat Jul 5 12:00:32 2008 -0500 Make some changes to core functionality to support pm-powersave This consists of core features extracted from the powersave-hooks branch, and does the following: * Refactor some settings in pm-functions to make it easier to support seperate settings for pm-action and pm-powersave. Other than sharing a mechanism for running hooks and being able to use certian utility functions, they do not have much in common w.r.t settings and lifecycle rules for those settings. * Move take_suspend_lock from pm-functions to pm-action. pm-powersave uses a simpler scheme, and there is not enough code sharing to justify having it in pm-functions. * Add a bit of code to pm-functions to figure out what chassis type we are running on. * Add a 00powersave hook that turns powersaving off across a suspend/resume. Things like laptop-mode in particular have been known to cause issues in some situations. * Make pm-powersave log to a real logfile and try to guess at the appropriate powersave mode if called with no arguments. commit 873733dad6476a7c5f7ec6068fb0be7b4c62edbb Author: Victor Lowther Date: Wed Jul 2 20:57:10 2008 -0500 Modify the tuxonice sleep module to modify $REVERSE for suspend_hybrid pm-utils can handle suspend_hybrid correctly now, so make use of that functionality. commit d06ab6c9c11c21d98ffbee19047678a1bd60b6a0 Author: Victor Lowther Date: Tue Jul 1 21:15:23 2008 -0500 Update documentation to describe the new two-parameter sleep.d regime commit c7e053a05844af2789bb7fab3bf81b0c6d1abcb6 Author: Victor Lowther Date: Tue Jul 1 21:09:09 2008 -0500 Add support for massing $METHOD as the second parameter to hooks This makes it easier for hooks that care about suspend_hybrid to handle it correctly without having to force all the other hooks to care about it. Also updated 01grub to conform to the new plan. commit d3223855cbb91c01776aca2d4196b79f73afd7ae Author: Victor Lowther Date: Fri Jun 27 23:34:48 2008 -0500 Make uswsusp work with the reordered hooks. 00clear -> 90chvt and all that. commit 1167ff73476bb7e17507f12b0d9a2460957a8952 Merge: 84e87ee 4256c9d Author: Victor Lowther Date: Fri Jun 27 23:22:13 2008 -0500 Merge branch 'vlowther-handle-hook-failure' commit 84e87eead51898570418f4e6ce86ec5b7651a33c Author: Victor Lowther Date: Fri Jun 27 20:09:22 2008 -0500 Minor updates and spelling fixes. commit 4256c9dd8f924deecd904f6b0b64817b1e7af74d Author: Victor Lowther Date: Sun Jun 22 11:40:24 2008 -0500 Added documentation in HOWTO.hooks covering abort on hook failure. commit 494ee04c73d8be70d5d5640e6c710d7073a22a0c Author: Victor Lowther Date: Fri Jun 20 23:26:31 2008 -0500 Document inhibit and inhibited in HOWTO.hooks commit 50243cc80599b56699cbf11c2872d905e3968d7d Author: Victor Lowther Date: Fri Jun 20 20:54:51 2008 -0500 update to pm-utils 1.1.2.3 with no change commit 965ff9c155d0151921514551881db4e6d499c214 Author: Victor Lowther Date: Fri Jun 20 20:50:18 2008 -0500 If suspend has already been inhibited, don't run more hooks. commit 153cc173c901761bc87b44759f6ce9a46de04da7 Merge: f89c736 315af0b Author: Victor Lowther Date: Sun Jun 8 19:19:50 2008 -0500 Merge branch 'master' into vlowther-handle-hook-failure commit f89c73694e5c5a057f06460410d278f3727e5225 Author: Victor Lowther Date: Sun Jun 8 19:17:36 2008 -0500 Simplify hook exit status testing logic a bit. commit 82c7efe54c7b04f2cf5bf73d9b0bf1c32fb26f56 Author: Victor Lowther Date: Sun Jun 8 18:53:19 2008 -0500 We have new manpages, so delete that bit of the TODO. commit 315af0beb95acefc786e8d025729da07ecd825c2 Author: Victor Lowther Date: Sun Jun 8 18:53:19 2008 -0500 We have new manpages, so delete that bit of the TODO. commit eb21ea1fa1cf633a88ac44fa8651e9691ae8c1c8 Author: Victor Lowther Date: Sun Jun 8 18:27:15 2008 -0500 Bumped revision to 1.1.2.3-test1 for testing purposes. commit b4dd07cdcad09ca8077ac28fbd435d947654777a Merge: b1ce8fe 7a2e509 Author: Victor Lowther Date: Fri Jun 6 20:48:22 2008 -0500 Merge branch 'master' into vlowther-handle-hook-failure commit 7a2e5093d110de02039ee3eca1f5ee290ef72c49 Author: Victor Lowther Date: Fri Jun 6 20:35:27 2008 -0500 Documentation updates describing the sleep hook ordering convention. commit b1ce8fe746a3e23d8cde072c3b2ba2060e56c62f Author: Victor Lowther Date: Fri Jun 6 19:48:38 2008 -0500 Incorrect comparison to skip non-run hooks when running hooks in reverse. commit 772852daba024d968ddad8fa2c440d72433f9e8e Author: Victor Lowther Date: Fri Jun 6 19:42:54 2008 -0500 Remember to escape > in pm-functions when running hooks too. commit 9187f1c652c40bbc9e1e8c7a1b72c18424a99afb Author: Victor Lowther Date: Fri Jun 6 19:38:26 2008 -0500 Actually remember to source our functions file in 50ntpd commit 68cc25ef5701abd38066797fbc6a86e6f461060a Author: Victor Lowther Date: Fri Jun 6 19:34:53 2008 -0500 Add missing close brace in 50ntpd commit 373c74b6ac3748cba04ee4e145555d93a409f4d0 Author: Victor Lowther Date: Thu Jun 5 08:23:22 2008 -0500 Escape > comparison in 98smart-kernel-video This closes Bug 16175 in fd.o bugzilla commit e0c3437b0f934b83675a560a8cdbdd3212f98b1e Author: Victor Lowther Date: Thu Jun 5 08:23:22 2008 -0500 Escape > comparison in 98smart-kernel-video This closes Bug 16175 in fd.o bugzilla commit 0218a2dd4a87a2d4966eb0c49843c2773dc36453 Author: Victor Lowther Date: Sun Jun 1 12:10:14 2008 -0500 Add initial support for handling hook failure If a hook exits with a status code other then 0 or one of the already-defined exit codes: * Inhibit suspend/resume, and do not run any more hooks. * Track the last sucessful hook that ran, and if we have to run hooks in reverse start with that hook. * If we inhibited for any reason, exit with a non-zero return code from pm-action. commit df34a14f1875c8bf650efbd0a9fa0a7561aa1677 Author: Victor Lowther Date: Sun Jun 1 09:12:52 2008 -0500 Start 1.2 development cycle commit 1803186ad283ad2ffee10956b197fc2199c0117b Merge: c232dc3 3dbc767 Author: Victor Lowther Date: Sun Jun 1 08:35:32 2008 -0500 Merge branch 'vlowther-reorganize-hooks' commit c232dc324c37debc1268ea7f8d6f5a46c2a135d3 Author: Victor Lowther Date: Wed May 28 21:27:04 2008 -0500 Bump revision to 1.1.2.2 commit 0a9f28988ccdfe2209f3864414168461b0115aae Author: Victor Lowther Date: Wed May 28 20:44:46 2008 -0500 Don't quote $PM_CMDLINE when saving initial parameters. commit fc4b5c0962ca731ff59d1867a68caa0c00b8b02e Author: Victor Lowther Date: Wed May 28 20:06:44 2008 -0500 Make parameter manipulation more robust in the face of programmer error. Use cp and rm when manipulating parameter files instead of mv. commit 3dd57d94dd26f2d0012fbc7bd1f3d192496c4491 Author: Victor Lowther Date: Wed May 28 18:34:12 2008 -0500 Fix broken add_parameters functionality. Also change storage directory cleanup to make things like this easier to debug in the future. commit 70f9c0b631b6bb6f2f394c0650d3b0b85c10a1c9 Author: Victor Lowther Date: Tue May 27 19:09:32 2008 -0500 Bump revision number commit eb03d095b926b43f116b9549cc0f38c8439ec65f Author: Victor Lowther Date: Tue May 27 18:59:13 2008 -0500 Save PM_CMDLINE correctly so that it shows up nicely in the logs. commit bc70374c72ca0cc04e777ed15639fef0c8b9c847 Author: Victor Lowther Date: Tue May 27 18:48:32 2008 -0500 Ensure that PARAMETERS.rm always exists. commit cf6120adf4c455eb31d09955382fdd01bb16ef9d Author: Victor Lowther Date: Tue May 27 18:45:32 2008 -0500 Moved parameter saving os that it always happens after we take the lock. commit 27b3f0f77592989863351634aad78d615b8cbba4 Author: Victor Lowther Date: Tue May 27 18:41:20 2008 -0500 Fix reversed logic when creating a parameters file. commit 361e8a769a808f5f329f80f24f67d5d144f334b6 Author: Victor Lowther Date: Tue May 27 18:37:34 2008 -0500 Save all parameters into a file instead of one file per param. This closes a security hole noticed by mbiebl. commit 605e67234f5b9690feacc3431ed227db637df18a Author: Victor Lowther Date: Tue May 27 10:43:52 2008 -0500 Return $NA instead of 1 when smart-kernel-video is not applicable. commit 0f506a904a0814d95a2d41ca873cfcf1776cff20 Author: Victor Lowther Date: Tue May 27 07:04:00 2008 -0500 Fixed error resulting in no parameters being saved. Moved the "mkdir -p ${STORAGEDIR}" command. commit 8d90eea7dea8ec0bc2f4ab62feeb965cac8675ba Merge: d48f63c d9f3d68 Author: Victor Lowther Date: Mon May 26 07:44:55 2008 -0500 Merge branch 'man-xml' commit d48f63c55f7281a2540dbb5515d5a42c1332545e Author: Victor Lowther Date: Mon May 26 07:34:32 2008 -0500 Actually install the documentation. commit 595753506a5904c234964043b72bc53734e83dd7 Author: Victor Lowther Date: Mon May 26 07:05:02 2008 -0500 Bump version number in preperation for release commit 5e1b6fd697a7f14ad3bbec628d6bef09951a3995 Merge: f94d93e 6b1b26a Author: Victor Lowther Date: Mon May 26 06:50:56 2008 -0500 Merge branch 'man-xml' xml-ized our manpages, and added manpages graciously donated by the Debian project. commit f94d93e8d4d988e7aa1bdc36bbbf0fadea724083 Merge: ab2deff a95fac9 Author: Victor Lowther Date: Mon May 26 06:49:32 2008 -0500 Merge branch 'vlowther-binary-video-quirks' commit ab2deff4eae5954e02bed2f01fbf81d2300b82fb Author: Dan Nicholson Date: Thu May 22 07:07:29 2008 -0700 Fix ChangeLog generation in distcheck Fixed the ChangeLog target for all the various situations it might fail in distcheck. commit f68c246e2f2bbf2e52d0369bb195ff7aedb3c72a Author: Dan Nicholson Date: Thu May 22 06:57:54 2008 -0700 Don't remove ChangeLog on distclean distclean is used in tarballs to return to a pristine state. Removing the distributed ChangeLog would violate that. commit 080429bad72c1ca87f636b85689d33e9096ff83b Author: Dan Nicholson Date: Thu May 22 06:54:39 2008 -0700 Ignore more generated files commit d9f3d682eb02d08afbd29b0c588f90b414d2e482 Author: Dan Nicholson Date: Thu May 22 06:11:38 2008 -0700 xmlto only takes a single file, don't pass more Minor nitpick so that only a single file, the first prerequisite, is passed to xmlto since it can only handle taking a single file. There was only one prerequisite anyway, so... not much to see here. commit e458c6e809cd2cf2112bbb885bec8d0b97af70a5 Author: Dan Nicholson Date: Thu May 22 06:04:28 2008 -0700 Only create manpage symlinks when target pages have been installed Instead of always creating the symlinks to pm-action.8, we first check that it's actually installed. commit 6db906ca51cc13d752f0b7e3462fd372ef06a49f Author: Dan Nicholson Date: Thu May 22 05:49:05 2008 -0700 Only build manpages when xmlto is available Don't require users to have xmlto and DocBook XML installed just to try pm-utils. However, since the man pages are required for dist, prebuilt pages will be available in the tarballs. commit 3dbc767c57e1a1ff1c59bcb6542a1f2ef7875579 Author: Victor Lowther Date: Sun May 18 10:31:37 2008 -0500 update Makefile.am to reflect hook name changes, commit 9eaef4ff2319e3813ba7ce17c30ffcdfb76506c2 Author: Victor Lowther Date: Sun May 18 10:27:53 2008 -0500 Even more reorganization commit cc55fcd04883f1462144eb3efdbb1c09fe7d6089 Author: Victor Lowther Date: Sun May 18 10:25:01 2008 -0500 Split the NTP handling code in 90clock into its own code. While I was at it, reorganized the hooks to conform to the new ordering convention. commit 6b1b26a50be94eef59df0a735a2b4ba0358662a7 Author: Victor Lowther Date: Sat May 17 19:24:56 2008 -0500 Missing a tag in pm-powersave commit a95fac932e9f9a921690860bd01f4e5b88b619c2 Author: Victor Lowther Date: Sat May 17 19:17:21 2008 -0500 Stefan pointed out that >= is not a valid string comparison op for test. commit b7689e5134fa18982d1b98711f057754d0ecbed2 Author: Victor Lowther Date: Sat May 17 19:02:56 2008 -0500 More pm-actiom manpage updates. commit a6e2ad4abd3b16657ee792311c25a364d537d38d Author: Victor Lowther Date: Sat May 17 10:01:00 2008 -0500 Remenber to set IFS back to normal before exiting run_quirks. commit 824f18a0d32f9f2a1ef661748bd35245a850af03 Author: Victor Lowther Date: Sat May 17 09:54:18 2008 -0500 arrgh, need to actually export PM_CMDLINE. commit e030d991958724c96d17adb244d64d17c4dd9df6 Author: Victor Lowther Date: Sat May 17 09:43:08 2008 -0500 Cleanups to parameter manipulation to make it a bit less evil This involved restructuring the run_hooks loop a bit, but it does clean things up some. commit 6394817797757edcc5a3e20efaad0d6d95398557 Author: Victor Lowther Date: Fri May 16 22:49:15 2008 -0500 log() is not in scope in hooks. commit d37f75e1b7b3c7ab8fee98606ecb3334b3af1eab Author: Victor Lowther Date: Fri May 16 22:40:56 2008 -0500 Make remove_parameters all work again. commit b680545d57649aeef740b91657e381512553ee47 Author: Victor Lowther Date: Fri May 16 22:19:47 2008 -0500 Fix another stupid error in get_parameters * is not a valid parameter. commit 2292a5914e63fb911b4c074155e1f2c71418fbfe Author: Victor Lowther Date: Fri May 16 22:07:39 2008 -0500 fix stupid typo in get_parameters. commit 6ddd3b7eec599bf29ac1b4a5c61a153708c202a9 Author: Victor Lowther Date: Fri May 16 21:56:36 2008 -0500 Handle binary video drivers using --quirk-none instead of disable_hook Otherwise, we would have to duplicate everything to handle the uswsusp use case, and that would be extra annoying. commit 22aaeeca28fbbbce7ed9d01124ed51ccbf450888 Author: Victor Lowther Date: Fri May 16 21:18:53 2008 -0500 Minor cleanups in 98-smart-kernel-video commit 8c366f223d8db7143ef7c458f0503655af5716b6 Author: Victor Lowther Date: Fri May 16 21:12:47 2008 -0500 Split smart kernel video driver handling to a different hook. The new 98-smart-kernel-video hook just disables 99video outright if we are running a video driver that is spart enough to handle its own quirks. commit 57d53b3bcb4aa218a63b48d14dc5ca0a1caad99a Author: Victor Lowther Date: Fri May 16 21:05:08 2008 -0500 Added support for vbe post with a romfile Apparently some video cards do not post when using the onboard BIOS. commit 8dd65d7dacc708f7320b0d362085889eb4f31f1a Author: Victor Lowther Date: Fri May 16 19:16:00 2008 -0500 Added support in 99video to check for a "smart enough" kernel video driver One that is "smart enough" knows how to handle video card reinitialization without needing any of the usual quirks. Right now that list includes: * nVidia binary driver. * fglrx ATI binary driver. * Intel i915 DRM driver on kernels at or after 2.6.26 commit a91dfd180848a8b61bcdfa966360636c820bfa7d Author: Victor Lowther Date: Thu May 15 13:02:44 2008 -0500 Split out the debugging information into README.debugging. I will add more thurough information on how to debug pm-utils later. commit 19a2e2412b19816b15380791774811b377abe9a4 Author: Victor Lowther Date: Mon May 12 13:06:07 2008 -0500 Forgot pm-powersave.xml commit f4b0f36cceaafe2368d8a0ba41515e89253add4d Author: Victor Lowther Date: Mon May 12 13:02:13 2008 -0500 Remove Debian-specific information from the imported manpages. Also rewrote parts of the pm-action manpage for clarity. commit 2250cd17cf7da757a267aa0d57e4fe9d48a6f3a5 Author: Michael Biebl Date: Sat May 10 19:11:16 2008 +0200 Fix man page section - Put pm-pmu into man page section 8 (admin tools) - Fix references to pm-suspend, which is also section 8 commit 3342684a217aefa3179192dad9cb364b9a319e20 Author: Michael Biebl Date: Sat May 10 18:55:54 2008 +0200 Make xmlto mandatory. Make xmlto mandatory for now. We can provide ./configure switch if requested. commit c6c675a5d85e0a3cf664eeb2e936102623cbf8d2 Author: Michael Biebl Date: Sat May 10 18:47:55 2008 +0200 Create symlinks for pm-action man page Create symlinks for pm-suspend.8, pm-suspend-hybrid.8 and pm-hibernate.8 pointing to pm-action.8 commit 2ceff51a323d13ab9b8df1a0b6db46b436d8e053 Author: Michael Biebl Date: Sat May 10 18:36:18 2008 +0200 Create man pages from docbook xml - Remove old docbook2man rules. - Add rules for creating man pages from docbook xml using xmlto. commit 8cff1174e991e21283032439ca972a6b4005c91f Author: Michael Biebl Date: Sat May 10 18:34:59 2008 +0200 Ignore *.8 man pages. commit dfb21b7d57fe12f2c9db3eb7d6904a0ab531b70b Author: Michael Biebl Date: Sat May 10 18:34:23 2008 +0200 Fix configure check for xmlto - Search for xmlto, not XMLTO - Remove obsolete check for docbook2man commit 0d7f3d63b713c063703c2ab75d49eb5689dcfe6c Author: Michael Biebl Date: Sat May 10 18:25:05 2008 +0200 Convert docbook sgml man pages to docbook xml commit a82ff0c63a73903bc314ea86847a0d712d38645b Author: Michael Biebl Date: Sat May 10 18:24:24 2008 +0200 Copy docbook xml man pages from Debian. commit 6816feeeee67fe9ee84d409753dc590c16ddfaa3 Author: Michael Biebl Date: Sat May 10 18:02:22 2008 +0200 Add a configure check for xmlto commit c6c5d707f81f7c3c8b44971c0f48b63e634dbaed Author: Michael Biebl Date: Sat May 10 18:06:20 2008 +0200 Ignore autogenerated pm/pm-functions. commit 49ef4f784d8489780542736d748cad04fe05a34f Author: Victor Lowther Date: Sat May 10 08:44:05 2008 -0500 Added special-casing of mode 3 in vbe_restoremode When we are restoring our vbe mode back to mode 3 (a text mode), use vga routines instead of vbe routines. Matthew Garret says it is more stable that way. commit b8fb53358d2aa90d694080486bd7f828d891e0be Author: Victor Lowther Date: Sat May 10 08:18:21 2008 -0500 Minor functions.in formatting changes. commit 831626d71e56c9241a3a77eab6f4cbc7f99e01d1 Author: Victor Lowther Date: Sat May 10 07:53:48 2008 -0500 pm-functions.in cleanups and minor fixes. Mostly adding comments to functions whose purpose is not immediatly obvious. Also restructured init_logfile to test for a null $1 before the file tests. commit e385c44402d3d1ba80b17e96ba4ced6d4c3650fa Author: Victor Lowther Date: Wed May 7 20:40:04 2008 -0500 Fix vbe mode restore bug Partial fix for pm-utils bug no. 15840 -- it does not include the vgamode special-case code. Thanks, Martin Pitt! commit ddbee7518ba53ab2161934bcdc4eea0394a27371 Author: Victor Lowther Date: Wed Apr 30 22:27:25 2008 -0500 Simplify implementation of check_suspend a bit. Why use 4 commands where 2 will do? commit 2d7fce602129abb1ce0590cd00637375a3423a62 Author: Victor Lowther Date: Wed Apr 30 22:19:41 2008 -0500 Added comments and minor fixes. commit 39b5eb3eb9a7353c5dacc91b672afae3ce9c97de Author: Victor Lowther Date: Wed Apr 30 19:15:31 2008 -0500 Normalize error checking introduced by a068f3fbc7c522. 'if [ command_exists "do_$METHOD" ]' always returns true -- [ is a command, not shell syntax. commit d98360b945cd44701a925192f36d7ef681a92823 Author: Dan Nicholson Date: Mon Apr 28 07:41:16 2008 -0700 Only build man pages when docbook2man is available Since not everyone has the whole DocBook chain, the building of the man pages is now conditional on the docbook2man utility being available. The built man pages are always included in `make dist', meaning that docbook2man must be available in that situation. commit a068f3fbc7c522bba62991dd7ffc7a2eb4aeee2e Author: Till Maas Date: Mon Apr 28 03:00:22 2008 +0200 - do not run hooks if do_$METHOD does not exist - log it when it does not exist - log abortion because of $INHIBIT commit 3c12201486d6470e6f3596704f8d305e71a143ea Author: Victor Lowther Date: Sun Apr 27 16:32:24 2008 -0500 Fix bug that would cause init_logfile to die if the logfile did not exist. Add an explicit check for file existence instead of relying on -O to do it for us. Thanks, Till Mass for pointing this out. commit 1fd4bb49ff73fff69fa6e4e94baeb9699fa2f00e Author: Till Maas Date: Mon Apr 14 22:29:53 2008 +0200 - add -w to grep in hibernate check to avoid matching "testproc" with "test" "shutdown" with "shut" Reported: Red Hat Bugzilla: #427018 commit e9f88b34d75052bab78fe9747f5c90b9f0f4a02c Author: Till Maas Date: Mon Apr 14 20:57:32 2008 +0200 - Mention "${PM_FUNCTIONS}" instead of harcoded 32bit path for functions file commit e6219e13d19c741c24822da40e20d37b81b3be5a Author: Victor Lowther Date: Sat Apr 12 08:26:17 2008 -0500 Fixed arithmetic expansion bug in uswsusp found by checkbashisms. commit 69456c003c8a03e809f88f159aeaa05d35134b71 Author: Victor Lowther Date: Thu Apr 10 22:02:15 2008 -0500 Added a README file for the distributions. It describes a better method for packaging hooks needed for suspend/resume -- namely, put the hooks in the package tht requires them rather than making them a part of the pm-utils package. commit 93af881ac18718c8eae7f575c3f30396791b0e75 Author: Michael Biebl Date: Mon Apr 7 10:55:05 2008 +0200 Add safety check before writing mode to /sys/power/disk Be extra paranoid and only set HIBERNATE_MODE if it is actually supported. commit 4b527b7b88e146e9633a11337e3055d282b5c281 Author: Michael Biebl Date: Mon Apr 7 10:47:28 2008 +0200 /dev/pmu better be a character device commit 782e3549d5cafb2a35e83faf88695a742a5fe64b Author: Michael Biebl Date: Mon Apr 7 00:12:43 2008 +0200 Disable 00clear for uswusp sleep module. s2ram has its own vt switching logic, so disable 00clear for the uswsusp sleep module. commit a410403c9fcf04841805d0311424bf6d7d3e083e Author: Michael Biebl Date: Wed Apr 2 09:41:12 2008 +0200 Check for s2ram in check_suspend(). The uswsusp sleep module uses s2ram now for do_suspend(), so check for the command in check_suspend(). commit 9a5792fbc6198c3b2a0fa89e4765b199cc65fb83 Author: Michael Biebl Date: Tue Apr 1 01:51:05 2008 +0200 Add some ideas how to integrate pm-utils with hal Add functionality to automatically retrieve quirks from hal or store them as fdi file. commit 32fa5f0c571d15b79547981501d2047ed094e9bd Author: Michael Biebl Date: Tue Apr 1 01:46:20 2008 +0200 Add some notes about updating and merging the man pages from Debian. commit 5ab80370c35c1b8a103b86ee7ab4861c9e2fd814 Author: Victor Lowther Date: Mon Mar 31 18:22:27 2008 -0500 Added note about suspend-hybrid handling to TODO. Also modified formatting to make it easier to read. commit 0bb9565ead57cba02c02b73f6ee7f59bc60b89ff Author: Richard Hughes Date: Mon Mar 31 19:38:35 2008 +0100 post release version bump commit 2c0d6788531e79e5eb184e60420064edc9a83ed6 Author: Richard Hughes Date: Mon Mar 31 19:37:51 2008 +0100 Victor Lowther is the new maintainer of pm-utils commit 6eed56bc0073e8ff2cc5aad8ee9f3355e8bddd32 Author: Victor Lowther Date: Sun Mar 30 10:51:19 2008 -0500 Final touchup to NEWS, make logging in pm-action a bit prettier. commit 116ed5d18838652f2405126958e8ed6e75527224 Author: Victor Lowther Date: Sun Mar 30 10:42:44 2008 -0500 Updated NEWS file to include changes to the pm-utils project. commit 4ffb15d6e3f0f87f952a7e747563ead099f8ae6a Author: Victor Lowther Date: Sat Mar 29 17:44:16 2008 -0500 Updated version number commit 4db81081d77847abc7461423dc0b40b60587c2d2 Author: Victor Lowther Date: Sat Mar 29 16:21:26 2008 -0500 Comment fixups in preperation for release. In particular, add comments to the top of the sleep hooks describing what each of them is for. commit b0c4c0a8bd4139a9da92f4cd25d0694b5911d9e1 Author: Victor Lowther Date: Sat Mar 29 15:12:12 2008 -0500 Spelling fixes in README and TODO commit 0c8886a67f04414c65ff71cea6d046f4f903ca30 Author: Victor Lowther Date: Sat Mar 29 14:14:55 2008 -0500 Updated NEWS and TODO files in preperation for release. See the files themselves for more details. commit 763243bad7ed0daf433e8c1793b602f563c5fbbd Merge: bae3503 df039c9 Author: Victor Lowther Date: Sat Mar 29 12:53:57 2008 -0500 Merge branch 'master' of ssh://vlowther@git.freedesktop.org/git/pm-utils commit bae3503fb464be7a0cd78462cd2c3d0b65e51a23 Author: Victor Lowther Date: Sat Mar 29 12:52:14 2008 -0500 Updated README in preperation for making a stable release. commit df039c9dc6917d7283d50c78a17405d38af77e96 Author: Michael Biebl Date: Fri Mar 28 15:44:43 2008 +0100 Improve PMU check Test if /dev/pmu is a character device. commit 30a3fcd9304b9de89800cf5cb23544ae2e6605a0 Author: Victor Lowther Date: Fri Mar 21 21:23:42 2008 -0500 Added README.debian-branch This file explains howto use the debian branch to create a .deb, and what sort of changes should be committed to debian (short version: nothing unless you know what you are doing. Really.) commit 00111ca8a48ede852ff6498e986bac4722047ebf Author: Victor Lowther Date: Fri Mar 21 20:09:38 2008 -0500 We no longer need to copy the .deb out of the way. commit 4eace1a370b8af7f71e3de8f2155c2ffd77d804d Author: Victor Lowther Date: Thu Mar 20 23:32:12 2008 -0500 Try again at this make deb thing. commit 199a64dc0c680064635d591d39eb11420c828662 Author: Victor Lowther Date: Thu Mar 20 23:27:36 2008 -0500 Get rid of unneeded automake machinery. commit 92458c3197b6f8101419ddbb813d5c8875763a76 Author: Victor Lowther Date: Thu Mar 20 23:20:13 2008 -0500 Added a make-deb script to replce the patched test-pm-utils script. commit dfbfe5e573eb64c1f346bf24bccf19c0a7b9c0d1 Author: Victor Lowther Date: Thu Mar 20 23:11:16 2008 -0500 Make the debian stuff its own semidetached head. commit bf5f55f5b5ec375ac1b0b565011b8bf9d0ccf178 Author: Victor Lowther Date: Thu Mar 20 19:33:44 2008 -0500 Avoid incorrect exit code 1 failure messages in the log. Do this by forcing resume_video to always return 0, and by having modreload expliticly log if it cannot reload a module we unloaded before suspend. commit 61e2d92c43953537855e89b744844b0af7b84700 Author: Victor Lowther Date: Thu Mar 20 19:15:51 2008 -0500 Prettify logging a bit more. Now with added timestamps, so you can see how long running all the hooks takes. commit f5419be4798d653a76e18e598236b140450ea127 Author: Victor Lowther Date: Thu Mar 20 18:05:36 2008 -0500 Cleaned up logging of which hooks ran a bit more. Do this by making log understand the -n option. To retain strict POSIX compatibility, we now use printf instead of echo in the log function. commit 5c88707ceb3ed04d7562f31f5a3aee1a4c1d895b Author: Victor Lowther Date: Thu Mar 20 18:58:54 2008 -0500 No need to clear the screen on 00clear. Allocating and deallocating vt 63 take care of that for us. commit 4177c51a5b713eff1dd07c65c723a87e297410c9 Author: Victor Lowther Date: Thu Mar 20 18:54:06 2008 -0500 Modify 94cpufreq to use savestate/restorestate more efficiently commit 95905af6b3a549b12bb9054043ce91a53d54c3cc Author: Victor Lowther Date: Thu Mar 13 17:24:55 2008 -0500 No need to print replies from dbus in 55battery. commit 6ae1dd2b1f0ab8f9e7f63e38473f109bafc8106b Author: Victor Lowther Date: Thu Mar 13 17:22:00 2008 -0500 Simplified implementation of 49bluetooth. No need for awk or for case statements. commit 23bc36cba4c017f70198ce3278db5597183f1e41 Author: Victor Lowther Date: Thu Mar 20 17:45:09 2008 -0500 Use 'all' instead of "*" to remove all commandline paraameters. commit a0b7a9e72d98312a1efd94e738a427c2694461df Author: Victor Lowther Date: Thu Mar 20 16:49:51 2008 -0500 Missed a close quote in modules.d/kernel commit 73ab1734f6d353ad4ee2d2f671e3944810fb88e7 Author: Victor Lowther Date: Thu Mar 20 16:43:07 2008 -0500 Added easy support to drop all parameters. Just set DROP_PARAMETERS to "*" commit f75ffa2e8c5391b50177375f0b46653dbd38cc7f Author: Victor Lowther Date: Thu Mar 20 12:48:19 2008 -0500 Changed kernel hibernation to use the default kernel method unless overridden. Hopefully this will get rid of the bug reports where "platform" causes problems. If it does not, we should probably default to "shutdown" as the default method. commit 868a6fabf6b254c53b12309fa9719eb5120e6d3f Author: Victor Lowther Date: Wed Mar 19 21:34:37 2008 -0500 Fixups in hook blacklisting and parameter removal. commit a4f4526748482fd8c08a132d4dcb4762fc111041 Author: Victor Lowther Date: Wed Mar 19 21:25:37 2008 -0500 remove_parameters was not doing The Right Thing. Rewrote parameter removal loop to try and fix that. commit 0129bc69e33523c9746a44fb4a78e25579acecb8 Author: Victor Lowther Date: Wed Mar 19 21:09:40 2008 -0500 Make the hook blacklist and parameter overrides use env. variables. This came about after a long discussion with mbiebl on the best way to configure settings in pm-utils. commit 174f1430e76dfcf9d45e6d44422a47c2e2bba369 Merge: ea374c8 55e3dbb Author: Victor Lowther Date: Wed Mar 19 20:35:54 2008 -0500 Merge branch 'vlowther-stabilization-bugfixes' into vlowther-default-parameters Conflicts: pm/pm-functions.in commit 55e3dbbfe6dc6ffae294cb1976a1a5c6cf9362da Author: Victor Lowther Date: Wed Mar 19 20:15:47 2008 -0500 Added copious commenting in the defaults file. commit 616c86edd7030f3cb1eaf7e08444f8882830977a Merge: 53743fa 2d224fc Author: Victor Lowther Date: Wed Mar 19 19:50:53 2008 -0500 Merge branch 'master' into vlowther-stabilization-bugfixes commit 53743fa7e2f1248fcaf1e6fe62a8390dcfadffcf Author: Victor Lowther Date: Wed Mar 19 19:48:31 2008 -0500 Rewrite fix for suspend_hybrid in a more elegant fashion We add a new variable $METHOD in pm-action. It holds the sleep method we were asked to invoke. $ACTION is chosen baed on the value of METHOD. commit ea374c82c37f881398cfa0eea2c7518286e1ae42 Author: Victor Lowther Date: Tue Mar 18 19:25:39 2008 -0500 Addind logging to add_parameter and remove_parameter commit aaf4bb9cc962c4aaf5004d53ce86d5fc29ae2be9 Author: Victor Lowther Date: Tue Mar 18 19:21:19 2008 -0500 Fix logic error in remove_parameter. commit e49b18c42f3c501e3d352df8b5356ba8cff1e6ab Author: Victor Lowther Date: Tue Mar 18 19:05:31 2008 -0500 Updated /etc/pm/parameters parsing. Now we can add and remove parameters passed from our invoker. commit 2d224fc56941d6c6c65b51d0e9943b331b8e69b8 Author: Victor Lowther Date: Mon Mar 17 19:16:19 2008 -0500 Mask out acpi_sleep settings when --quirk-none is passed. mbiebl and I have been discussing removing the current behaviour for --quirk-none. This patch retains the behaviour where --quirk-none masks out the other video quirks instead of signalling that no quirks are required. commit 5292f700d84d50e40d6690d415ba5f97b39979d4 Author: Victor Lowther Date: Mon Mar 17 12:24:04 2008 -0500 Add more logging -- log parameters and the hook blacklist. This patch adds basic logging of our commandline parameters before and after loading the parameter overrides. It also adds logging of our initial blacklist entries. commit 29a615e95956da7bbc925a0d139ea38fa4956530 Author: Victor Lowther Date: Mon Mar 17 07:30:45 2008 -0500 Actually make "make dist" work. --git-dir has to come before the log command when generating the changelog. commit 5d4eaefc302d35d5a3ac2fbdf09a799597b5c536 Author: Victor Lowther Date: Sun Mar 16 18:57:38 2008 -0500 QUIRK_NONE was not being honored in uswsusp. Added code to zero out OPTS if QUIRK_NONE = true. commit f8a6c613a3f432b96d076e16c036de74c27a0856 Author: Michael Biebl Date: Mon Mar 17 00:27:07 2008 +0100 Remove outdated documentation. We handle video quirks in uswsusp now, so this documentation is outdated and best removed. commit 5de0eb47fc7b0a07b9fc1df6ad20ed9912ef492a Author: Michael Biebl Date: Mon Mar 17 00:13:46 2008 +0100 Parse video quirks in uswsusp sleep module - Parse the video quirks in the uswsusp and pass it to s2ram (do_suspend) and s2both (do_suspend_hybrid). - Show the available quirks in the help method. - quirk-save-pci is currently s2ram specific and not yet provided by hal. - quirk-dpms*, quirk-reset-brightness and quirk-vga-mode3 are not handled by s2ram and thus simple no-ops. commit 54eff27133ce0ed1f899b237d9946a3f31546a96 Merge: 1234dd9 fe61299 Author: Michael Biebl Date: Sun Mar 16 23:58:19 2008 +0100 Merge branch 'pmu' commit 1234dd9926d0f5a816a5a0728d7289dd932d87e0 Merge: 9ebfc96 e9f2ddf Author: Victor Lowther Date: Sun Mar 16 17:24:52 2008 -0500 Merge branch 'master' into vlowther-stabilization-bugfixes commit 9ebfc96ce7558bb7db0132d579ec85dde77237e9 Author: Victor Lowther Date: Sun Mar 16 16:49:11 2008 -0500 Updated README to describe /etc/pm/blacklist and /etc/pm/parameters. Also added a bit of documentation describing --help. commit fe612997f9809777864ce859ad5ad47a02fb6dcb Author: Michael Biebl Date: Sun Mar 16 19:01:59 2008 +0100 Better PMU support. - If /dev/pmu is existent, assume we can suspend - Don't try to run pm-pmu on machines without a PMU commit e802a8c71ed3a2f696181d69b0feca80b5aba06f Author: Victor Lowther Date: Sun Mar 16 16:33:36 2008 -0500 Consolidated console save/restore code. Instead of having console switch/restore logic spread out all over the place, have 00clear perform all our console switching. commit e9f2ddf6709c2d8b8bf9eed16a20a2123a51f747 Author: Michael Biebl Date: Sun Mar 16 19:07:02 2008 +0100 Make the modules shell script We install the sleep modules as _SCRIPTS, so they should be 0755 and have a shebang. This has the additional benefit that editors automatically enable syntax coloring. commit 4fe96950186e616db17767ce78690f7b82231a51 Author: Victor Lowther Date: Sun Mar 16 11:24:55 2008 -0500 Fix bug where pm-is-supported could only be run as root. Now we only parse the blacklist and the default parameters when we are taking the suspend lock. commit 1de164bdd3915e7c93329a9df77064ed7b402ea1 Author: Victor Lowther Date: Sat Mar 15 18:04:11 2008 -0500 Mostly seperated vt switching logic from the suspend_lock logic. This should fix the breakage implemented by moving the locking. commit 40cf5324abdfa5eac08cba836ca84097849ad188 Author: Victor Lowther Date: Sat Mar 15 17:18:17 2008 -0500 Implemented sleep_method_help support. This intergrates sleep modules into the help system. commit de8659ed4bb5d42251ee8695fc54642dbcce0604 Author: Victor Lowther Date: Sat Mar 15 17:07:49 2008 -0500 Moved locking in pm-action. This fixes a help-related bug that Michael Biebl noted. commit 962304a9279c244c9cdc1328cb800dd6bd49736e Author: Victor Lowther Date: Sat Mar 15 16:38:32 2008 -0500 Restore separate logging functionality Somehow the changes introduced by 1fb77e994d7d1628c86324066693fd23d4abfb6c got dropped in the merge process. Restored them. commit 135bc1f5858caeae2b803e1e5c220b284c45b03c Merge: 0234380 c99900e Author: Victor Lowther Date: Sat Mar 15 13:54:18 2008 -0500 Merge branch 'vlowther-dynamic-hook-disable' into vlowther-default-parameters commit c99900e9e8bf7f909ac42f825e5f2694dc26b611 Merge: 8626bbd ac2e951 Author: Victor Lowther Date: Sat Mar 15 13:53:31 2008 -0500 Merge branch 'master' into vlowther-dynamic-hook-disable Conflicts: pm/pm-functions.in commit ac2e951e553f69dc5ab04b37f4e973bebdb1f5c4 Author: Victor Lowther Date: Fri Mar 14 07:21:34 2008 -0500 Split functions.in into functions.in and pm-functions.in pm-functions.in contains the functionality that should only be used by the pm-utils frontends (pm-action, pm-is-supported, and pm-powersave). functions.in contains code that is shared between the hooks and the pm-utils frontends. The reason behind splitting this out is to reduce namespace pollution in the hooks and to eventaully make it easier to split the hooks into their own package. commit 0234380da899b2ae52ab5d88dde9914c6f1e3170 Merge: 44cbf06 8626bbd Author: Victor Lowther Date: Thu Mar 13 10:02:51 2008 -0500 Merge branch 'vlowther-dynamic-hook-disable' into vlowther-default-parameters commit 8626bbd7551f8342abc7536899f55f49fd0820e9 Author: Victor Lowther Date: Thu Mar 13 10:01:31 2008 -0500 Updated HOWTO.modules to mention before_hook. Sleep module writers, take note. commit 44cbf065577bbe9ae9ffc783895cbe45f42c3f13 Merge: dce0189 a30d46c Author: Victor Lowther Date: Tue Mar 11 19:56:03 2008 -0500 Merge branch 'vlowther-dynamic-hook-disable' into vlowther-default-parameters commit a30d46c64050f919f96baf626ae13d79d1023317 Author: Victor Lowther Date: Tue Mar 11 19:54:21 2008 -0500 Optionally ignore two leading digits in the hook filename in hook_ok Requested by Michael Biebl. commit dce01897081f9c23b3b33ed600b4190ac91f8ee3 Merge: 0978de0 02685b1 Author: Victor Lowther Date: Tue Mar 11 17:29:29 2008 -0500 Merge branch 'vlowther-dynamic-hook-disable' into vlowther-default-parameters commit 02685b1ea67e656c646f8bcbad6645df08441ee5 Author: Victor Lowther Date: Tue Mar 11 17:28:03 2008 -0500 Updated hooks documentation. commit 0978de0966987eb2426cfdb3a78d77eca7c4ed98 Author: Victor Lowther Date: Sun Mar 9 15:11:08 2008 -0500 Added support for passing default parameters. We add them in the "$PM_UTILS_ETCDIR/parameters" file, and they are simply appended to the PM_CMDLINE env variable. commit 73157d2bd3fc9ece5b5747bf69dfc39d4b2e0390 Author: Victor Lowther Date: Sun Mar 9 14:56:05 2008 -0500 Move PM_CMDLINE declaration into pm_functions.in. This lays the groundwork for allowing the user to add default parameters to potentially override the ones that HAL passes to us. commit 47cc4095aa3a310b829a9b274d5de0f7e6af7326 Author: Victor Lowther Date: Sun Mar 9 14:49:50 2008 -0500 Ensure wwe have made $STORAGEDIR before trying to blacklist hooks. commit cab059db8842ffcae4b34af9805e34f3ae4f41d3 Author: Victor Lowther Date: Sun Mar 9 14:43:14 2008 -0500 Fixed stupid typo in disablehook. commit fc6700f0bed495ca6323ad8223b8bdef5351837c Author: Victor Lowther Date: Sun Mar 9 14:37:46 2008 -0500 Really really make reading the default blacklist work. commit 520985236611d96a597bbc68dcaddc93451d1fa6 Author: Victor Lowther Date: Sun Mar 9 14:12:58 2008 -0500 Actually source the correct blacklist file. commit 66db33b5431a1f01df6c500c22d5ca0bd362acc1 Author: Michael Biebl Date: Sat Mar 8 03:16:33 2008 +0100 Implement the root check using id, $EUID seems to be a bash only feature. commit d672471adca4ec3208e15c2198e46004541a20de Author: Victor Lowther Date: Fri Mar 7 20:15:48 2008 -0600 Moved the "Running hook" diagnostic message in run_hooks. commit 198136577ea5c57e86aa9b01f95d63ce0b882e5c Merge: 4b19986 fee2b63 Author: Victor Lowther Date: Fri Mar 7 20:12:35 2008 -0600 Merge branch 'master' into vlowther-dynamic-hook-disable commit fee2b6346509d94b24670fcd2d5f151568617cd2 Merge: ea906bd 593be4a Author: Victor Lowther Date: Fri Mar 7 19:55:39 2008 -0600 Merge branch 'master' of git://anongit.freedesktop.org/pm-utils commit 593be4adab75f1db65b832106ca78be25b9b2cf2 Author: Michael Biebl Date: Fri Mar 7 16:29:09 2008 +0100 Fix a quirk parsing in 99video. - We no longer use $@, so replace $1 with $opt and remove shift - Remove an unnecessary check. commit ea906bd716a435abcff0cc580982eabee9c90bd4 Merge: 5944c4c 2428334 Author: Victor Lowther Date: Fri Mar 7 07:17:31 2008 -0600 Merge branches 'vlowther-create-ChangeLog-on-demand' and 'vlowther-remove-autogenerated-man-pages' commit 5944c4c006a8ac753baf9add36095eddeddb5ba9 Merge: 1866fab a0c3dfa Author: Victor Lowther Date: Fri Mar 7 07:16:56 2008 -0600 Merge branch 'master' into vlowther-create-ChangeLog-on-demand commit 2428334b9068281493d1fb5b02fc76d1b47ef342 Merge: 4aa61c8 a0c3dfa Author: Victor Lowther Date: Fri Mar 7 07:16:37 2008 -0600 Merge branch 'master' into vlowther-remove-autogenerated-man-pages commit acaf13ae802f72a3c37217c86f80c80db69f852e Merge: ae82bec a0c3dfa Author: Michael Biebl Date: Fri Mar 7 08:23:19 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/pm-utils commit 4b1998601c7b075a432bdd7fd6975ca2d3689995 Merge: 283ed26 61307c3 Author: Victor Lowther Date: Thu Mar 6 21:29:38 2008 -0600 Merge branch 'vlowther-split-functions-in-two' into vlowther-dynamic-hook-disable commit 61307c3c16cc1b06bb3c1e8d3636c3c14832a4f9 Merge: a1431a2 a0c3dfa Author: Victor Lowther Date: Thu Mar 6 21:27:03 2008 -0600 Merge branch 'master' into vlowther-split-functions-in-two commit 283ed262ab666f853d18e632e54052021f58f638 Merge: 6ed9717 a0c3dfa Author: Victor Lowther Date: Thu Mar 6 20:35:09 2008 -0600 Merge branch 'master' into vlowther-dynamic-hook-disable commit 6ed9717e8e6621634eaeec9cd3753413fd924459 Author: Victor Lowther Date: Thu Mar 6 20:32:06 2008 -0600 uswsusp disables 99video hook now. commit 96442732e5b8729332cc715e992392aeb3b8cae9 Author: Victor Lowther Date: Thu Mar 6 20:30:47 2008 -0600 Change the default blacklist location to PM_SYSCONFDIR. Also add before_hooks support to run_hooks. commit a0c3dfab5a1381677b2ef991ae40c7e7b52c1c60 Author: Victor Lowther Date: Thu Mar 6 19:21:12 2008 -0600 Revert "Even shorter quirk environment variable names." This reverts commit 6d877fe5e1439496b20365e6877916ab3c7446f2. Requested by Michael Biebl. Does not affect functionality. commit a4ca3e7c2d1d1fae584ac23195a13981947884c0 Merge: 2b08245 5da6cdf Author: Victor Lowther Date: Thu Mar 6 19:16:23 2008 -0600 Merge branch 'master' into vlowther-hook-option-processing commit 5da6cdfef068db2fac484e45732f50a572074343 Merge: 04f05c2 02c4338 Author: Victor Lowther Date: Thu Mar 6 19:08:22 2008 -0600 Merge branch 'vlowther-video-merge' commit e3403ecac7243e571dd6bdc01b38f15af39e543e Author: Victor Lowther Date: Thu Mar 6 14:08:52 2008 -0600 Have pm-functions.in read an initial list of hooks to blacklist. Be a little smart about it, and allow comments. commit 314642f6d67ab7658d2762aafa598971ce1c865e Author: Victor Lowther Date: Thu Mar 6 13:52:23 2008 -0600 Make run_hooks skip disabled hooks. Eventually we will print a helpful diagnostic in the logfile saying what disabled the hook based on the contents of the disabled file, but that is a job for a later date. commit 4a9919cea52219555cb87e308afcace3104c39e2 Author: Victor Lowther Date: Thu Mar 6 13:44:31 2008 -0600 Add disablehook() function to functions.in. This is the first step in allowing hooks to be dynamically disabled while pm-utils is running. commit 1866fab10d7f630278357a33c8289c136996c1bc Author: Victor Lowther Date: Thu Mar 6 13:15:44 2008 -0600 Made ChangeLog creation process more robust. Changes based on feedback from Dan Nicholson. commit 04f05c28427de4c1e96cb3b343834c22f7dcad7d Author: Victor Lowther Date: Thu Mar 6 10:19:48 2008 -0600 Fixed the case where two or more cores share the same cpufreq settings. If the cpufreq directory is a symlink, that that cpu shares it settings with another cpu. In that case, skip this cpu. commit 02c4338048175769ca81ee75d25b1dda8706c039 Author: Victor Lowther Date: Thu Mar 6 10:08:45 2008 -0600 Silence sysctl output in 99video. commit a1431a2e40a2739cd05e5c6f0a7fc15a9e53ab2b Author: Victor Lowther Date: Wed Mar 5 15:32:47 2008 -0600 Updated pm/Makefile.am to know about pm-functions. commit 9232cd18a317936de20d365b4e9178eead4c7c41 Author: Victor Lowther Date: Wed Mar 5 15:26:47 2008 -0600 Split functions.in into functions.in and pm-functions.in pm-functions.in contains the functionality that should only be used by the pm-utils frontends (pm-action, pm-is-supported, and pm-powersave). functions.in contains code that is shared between the hooks and the pm-utils frontends. The reason behind splitting this out is to reduce namespace pollution in the hooks. commit 94722ed73c79fefc3e98c6cd1c194eddeb325aeb Author: Victor Lowther Date: Wed Mar 5 15:17:15 2008 -0600 Rearrange functions.in in preperation for splitting it in two. commit 4aa61c883c8d0eb691b408e2967f63434ef8eca2 Author: Victor Lowther Date: Wed Mar 5 14:28:07 2008 -0600 Do not track the man pages. They are generated from the SGML files, so we do not need to track them in git. commit 28836a53fd617b6eeabda4a57fc4d15801d69a49 Author: Victor Lowther Date: Wed Mar 5 09:10:36 2008 -0600 Generate ChangeLog on demand. Specifically, any make target that requires it (make dist, etc) will generate pull an appropriately-formatted changelog out of git. commit 2b082457e3a9d8f8067376fd45668fc7595b8fea Merge: bf4f3e0 9f3e2ea Author: Victor Lowther Date: Wed Mar 5 09:01:02 2008 -0600 Merge branch 'master' into vlowther-hook-option-processing commit ae82bec26a64721674148cfa15a1f204528de2c2 Merge: d1e11fc 9f3e2ea Author: Michael Biebl Date: Tue Mar 4 01:43:53 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/pm-utils commit bf4f3e0cce274f95e76d88fed3e337d87822e363 Author: Victor Lowther Date: Mon Mar 3 18:28:17 2008 -0600 Updated the HOWTO.hooks to document the help parameter. Also added a section dealing with suspend_hybrid. commit 9f3e2ea40123ca048d99f2a0d3911af642c87cfa Author: Victor Lowther Date: Mon Mar 3 18:09:35 2008 -0600 Fixed typo in 94cpufreq introduced while fixing the suspend_hybrid glitch. Thanks, Michael Biebl! commit d1e11fc3c9d50be7c1bcf9d318c509c2b0639ed8 Merge: 4602610 4ccda76 Author: Michael Biebl Date: Sun Mar 2 03:17:45 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/pm-utils commit 053da7a5efd23b23527d073c0e63785211c4c954 Merge: 6d877fe 25b9408 Author: Victor Lowther Date: Sat Mar 1 19:10:44 2008 -0600 Merge branch 'vlowther-video-merge' into vlowther-hook-option-processing commit 25b94082bc1588f5c9a2dc4be857531c774b8b2b Merge: 8330c3a 4ccda76 Author: Victor Lowther Date: Sat Mar 1 19:06:48 2008 -0600 Merge branch 'master' into vlowther-video-merge commit 4ccda76bcc288f5505abc97caffb913d35e71c26 Author: Victor Lowther Date: Sat Mar 1 18:50:27 2008 -0600 Add comments in pm-action detailing the steps we are taking. commit e5c47367b743af80155176d69c1f4e7ca69843c6 Merge: 76dd8d9 369ac12 Author: Victor Lowther Date: Sat Mar 1 18:41:09 2008 -0600 Merge branch 'master' into vlowther-move-pm-main commit 369ac121377c6e840a3295eeeb84e96104f9fe1f Author: Victor Lowther Date: Sat Mar 1 18:28:47 2008 -0600 We were not handing the suspend_hybrid case correctly this whole time. Shame on me for not spotting this earlier. commit 76dd8d91365b0c5e85cd6d494c7a5e2b3c27235b Author: Victor Lowther Date: Sat Mar 1 18:27:36 2008 -0600 Fixed up merge errors merging back with master. commit 9022cb6113a910ae559cbb3a3833f07107df400d Merge: f33864c 9343bda Author: Victor Lowther Date: Sat Mar 1 18:09:53 2008 -0600 Merge branch 'master' into vlowther-move-pm-main Conflicts: src/pm-action.in commit 6d877fe5e1439496b20365e6877916ab3c7446f2 Author: Victor Lowther Date: Sat Mar 1 11:02:51 2008 -0600 Even shorter quirk environment variable names. commit 1fb77e994d7d1628c86324066693fd23d4abfb6c Author: Victor Lowther Date: Sat Mar 1 10:37:49 2008 -0600 Cleaned up output for --help Did this by adding a log() function and using that instead of echo when we were just echoing test to get it into the log. commit 8d5f23f720c121508bd61202cbd75c6d91a07f6d Author: Victor Lowther Date: Sat Mar 1 10:26:49 2008 -0600 Moved video-specific option processing to 99video. commit dc1a31a76a26ff5258f02b0f533c53974c00e687 Author: Victor Lowther Date: Sat Mar 1 10:08:05 2008 -0600 first pass at using run-hooks to get help info. The output from this will be ugly, if it even works. commit 3c2766986130026a47badff7edb740709c0a5b1e Author: Victor Lowther Date: Sat Mar 1 09:56:38 2008 -0600 Add help function to 99video. This is the first step in making hooks handle option processing for their options instead of having the pm-utils framework handle it. commit 8330c3a6c14ba33563ddcf76fe53288a4f1cb9ab Author: Victor Lowther Date: Sat Mar 1 10:06:13 2008 -0600 arrgh -- forgot to remove 20video from Makefile.am commit e28844bc7a42cab0d5d08ba0aa351885b3fa78c8 Author: Victor Lowther Date: Sat Mar 1 09:32:20 2008 -0600 Aesthetic cleanup to the quirk-handling code. commit fda3bb71c9e4d4fbfc730d1277085e241475ceb1 Author: Victor Lowther Date: Sat Mar 1 09:02:41 2008 -0600 Shortened quirk environment varialbe names. Also made option handling code in pm-action easier to read. commit 5d7e32ef87f97cb09890b7690f9f62c3395ab673 Author: Victor Lowther Date: Sat Mar 1 08:38:37 2008 -0600 Replace if statements with command chaining in 99video. commit 0671b13c2aa695a35ef0a703ac3cf9cf877dca0e Author: Victor Lowther Date: Sat Mar 1 08:24:37 2008 -0600 Add a quirk helper function to start cleaning up the ugly if mess in 99video. commit faa4c5d24da753010f033561a02b4e7499b79eb3 Author: Victor Lowther Date: Sat Mar 1 08:11:42 2008 -0600 Rearrange quirk handling to bring it in line with s2ram. commit fba432cae9b7cba19e2d9dad0b11417ad9d6f717 Author: Victor Lowther Date: Fri Feb 29 00:02:49 2008 -0600 Save framebuffer state after saving videostate. commit 49de11afaa42ae63d5a030c1b146d828ae2e5eac Author: Victor Lowther Date: Wed Feb 27 20:20:33 2008 -0600 Modified acpi_flag setting to use arithmetic expansion. This gets rid of an ugly if statement and makes the code more legible. commit 17d18f832ac3c20b2c86bf9d76c7296d0561ee02 Author: Victor Lowther Date: Wed Feb 27 20:14:06 2008 -0600 Modified 99video to use savestate/restorestate to save and restore VBE state. This utilizes the functionality added in the last patch, and makes the hook more location-independent. commit 58c7d77aa0f37f1d50f89753e1a846795476bc47 Author: Victor Lowther Date: Wed Feb 27 20:06:07 2008 -0600 Made savestate and restorestate in functions.in orthogonal. You can pipe data into savestate, and pipe it back out of restorestate. This also makes savestate/restorestate able to cleanly handle data with embedded NULs and other such nasties that may confuse bash. Savestate is still backwards compatible with the older calling convention. commit df278aba456f44fe4573c60ba0d524370ee5ad96 Author: Victor Lowther Date: Wed Feb 27 20:01:14 2008 -0600 Added support for DISPLAY_QUIRK_NONE to pm-action.in. commit 81ee00dc3b1a85471c53cb193c9f1edb63e71fc7 Author: Victor Lowther Date: Wed Feb 27 19:58:23 2008 -0600 Added support in the video hook for DISPLAY_QUIRK_NONE. When it is set to true, avoid quirk handling by exiting immediatly. commit a7278a0bc224226f9cd3d0199347051ec7ab9bed Author: Victor Lowther Date: Wed Feb 27 19:53:42 2008 -0600 Folded 20video functionality into 99video and deleted 20video. commit 4602610deaaa6846598e74312ea37e2731b53e35 Merge: d77df4e 9343bda Author: Michael Biebl Date: Sat Feb 23 11:32:43 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/pm-utils commit 9343bda51f8feff514b2bd0430c6435ee7466148 Merge: 65c84de 734f80b Author: Victor Lowther Date: Sat Feb 23 00:33:23 2008 -0600 Merge branch 'master' into stabilizaton commit f33864caecfea67be95abf0719e96861d6c243b3 Author: Victor Lowther Date: Thu Feb 21 20:28:46 2008 -0600 Added back the comment explaining the trap statement. commit b8ccc1c4cc2c5415eb57cf9a0b05218c24e4914d Merge: a6eeb80 734f80b Author: Victor Lowther Date: Thu Feb 21 20:23:54 2008 -0600 Merge branch 'master' into vlowther-move-pm-main commit d77df4eb4107f2361b5add5b9165fa1b6a4d4996 Merge: 8faffa6 734f80b Author: Michael Biebl Date: Wed Feb 20 15:32:25 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/pm-utils commit 734f80b6de32c6740fc908f43407e46f36401416 Merge: 2ffbb21 4dc7cb0 Author: Victor Lowther Date: Tue Feb 19 18:09:17 2008 -0600 Merge branch 'vlowther-fix-broken-hook-sort' commit 4dc7cb0363398b719505c1015aec3c2c22e994da Author: Victor Lowther Date: Tue Feb 19 17:01:56 2008 -0600 Fix broken sorting in run_hooks. commit 8faffa678d950ce32703fd27b4980ea015abec08 Merge: 4b7284e 2ffbb21 Author: Michael Biebl Date: Tue Feb 19 11:42:46 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/pm-utils commit 2ffbb213b02eebe32eda93cf4330a11150aa1b7b Author: Richard Hughes Date: Tue Feb 19 01:40:38 2008 +0000 rename obsolete onfigure.in -> configure.ac - no other changes commit 4b7284e880532354323704143a9f698bd54b2027 Merge: 9fbde30 28f4915 Author: Michael Biebl Date: Sat Feb 16 23:52:32 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/pm-utils commit a6eeb8096864bee88efe09f6cbb3d9ee3b24cdbd Merge: 4d455ce 28f4915 Author: Victor Lowther Date: Sat Feb 16 15:00:07 2008 -0600 Merge branch 'master' into vlowther-move-pm-main commit 65c84de480fb3565978e8a0778d53023a242ea95 Merge: 8672d50 28f4915 Author: Victor Lowther Date: Sat Feb 16 14:52:33 2008 -0600 Merge branch 'master' into stabilizaton commit 28f4915e717fbc31b5410f77bf7882928def0545 Author: Michael Biebl Date: Thu Feb 14 18:32:01 2008 +0100 Replace -O with -f where appropriate The owner check for sourcing config files/sleep modules is wrong, because it doesn't allow to run pm-is-supported unprivileged. In addition, source the sleep module after source_configs, so SLEEP_MODULE can be configured via /etc/pm/config.d/ commit 3a8459c883ef0e2730278fe23f873f4c3c6912c2 Author: Michael Biebl Date: Thu Feb 14 17:17:33 2008 +0100 Fix inverse file owner check in init_logfile() commit 7f51729e23cfb0906ddd37d4bb24b8d26653d06e Author: Michael Biebl Date: Thu Feb 14 16:52:28 2008 +0100 Clean up generated files and put *.in files in the tarball. Make sure to clean up all generated files on "make clean". Don't distribute generated files in the dist tarball, only the *.in files. Add generated files to .gitignore. Use consistend naming for the install dirs. Install defaults file as data file. Keep EXTRA_DIST and CLEANFILES in sync. commit 1a9e28fa4a4d2cb1e1be016ac50188b3de871da9 Author: Michael Biebl Date: Thu Feb 14 16:26:50 2008 +0100 Add safety checks for *_fbcon() commit 13a8102dffe3b54d44cbf5d8989cf68cd5971591 Author: Michael Biebl Date: Thu Feb 14 16:23:46 2008 +0100 Consistently use tabs for indentation. commit 2b99001c87461df573cf6ae3091f88e193ede23a Author: Michael Biebl Date: Sat Feb 16 10:19:40 2008 -0600 99video had a missing closing bracket. While fixing that I noticed that we use an inconsistent style for function brackets. I chose foo() { } as it seemed to be the most used one. Cheers, Michael commit 8672d50c1fca29b2bbaedf90b5c27a319952717c Author: Victor Lowther Date: Sat Feb 16 10:15:22 2008 -0600 Removed redundant call to exit in pm-is-supported. commit 5f98b0a73d390ef42c4219939610f7c8d17ab1cb Author: Victor Lowther Date: Sat Feb 16 10:12:34 2008 -0600 Removed redundant exit call in pm-action.in commit e440eea026349b5e2e3f9e77b6cc38af12468331 Author: Victor Lowther Date: Sat Feb 16 10:10:34 2008 -0600 Our version of on_ac_power does not return 255. Having the man page say it does might be a little confusing. commit da108f79aa86b2b131437e6d680891d641b569ea Author: Victor Lowther Date: Sat Feb 16 10:06:22 2008 -0600 Get rid of redundant calls to exit in 99video commit a91ff846eebca791a55ab02afa4413ed33d13c77 Author: Victor Lowther Date: Sat Feb 16 10:05:44 2008 -0600 Modify 95led to exit $NA where applicable. commit a295ae5e7d7d26cafcef9c9ff9ab54ef09a461d1 Author: Victor Lowther Date: Sat Feb 16 10:04:42 2008 -0600 Modify 94cpufreq to exit $NA where applicable. commit 109c1b9f93402e9d5bf79616ea040e7deda28167 Author: Victor Lowther Date: Sat Feb 16 10:03:57 2008 -0600 Modify 90clock to exit $NA when applicable. commit c4ad6d12417de2ce9dc76fb88ce042e43ddc3d51 Author: Victor Lowther Date: Sat Feb 16 10:02:58 2008 -0600 Get rid of redundant calls to exit. commit bb2c3cdf1b1438f743803eab084995b25b61053e Author: Victor Lowther Date: Sat Feb 16 10:02:26 2008 -0600 Modify 50modules to return $NA of there are no modules to unload. commit 729754f008fc99d401583b493de03b73fedaa2bf Author: Victor Lowther Date: Sat Feb 16 10:00:57 2008 -0600 Modify 49bluetooth to exit $NA where applicable. Also got rid of redundant calls to exit. commit b1fdee390a5b5972b0c71752445354f9d3f50816 Author: Victor Lowther Date: Sat Feb 16 09:59:53 2008 -0600 Get rid of redundant calls to exit. commit 25e73f1a6b1340f6ff125c3126a39f4d30788f04 Author: Victor Lowther Date: Sat Feb 16 09:58:56 2008 -0600 Modify 10NetworkManager to exit $NA where applicable. Also get rid of redundant calls to exit. commit 95e8d891352a373d1c1d8e55eebc46ab1d445621 Author: Victor Lowther Date: Sat Feb 16 09:57:44 2008 -0600 Modify 05led to exit $NA where applicable. Also get rid of redundant calls to exit. commit 436ebacce6b142b956d5f94d1bb8b0568343cd2f Author: Victor Lowther Date: Sat Feb 16 09:56:30 2008 -0600 Fix up 01grub to exit $NA when the hook is not applicable. Also get rid of redundant calls to exit. commit c62130114d1207163c9ed4628a41657695388672 Author: Victor Lowther Date: Sat Feb 16 09:55:03 2008 -0600 Get rid of redundant call to exit in 00logging. commit 256fefe91df74dd82991a5db5e17130feb51c339 Author: Victor Lowther Date: Sat Feb 16 09:54:38 2008 -0600 Get rid of redundant call to exit. commit 81c9a1a9be78b7c105330e66fcf540b0520962ab Author: Victor Lowther Date: Sat Feb 16 09:38:24 2008 -0600 Display hook exit statuses on the logfile. This also reserves exit code 254 for the hooks to indicate that the hook was not applicable to the system. We treat this specially because it is not a failure on the hooks part that it cannot run on that system. commit 9fbde3095567e3a7ea6a9f14096e1185042d4b40 Author: Michael Biebl Date: Thu Feb 14 16:52:28 2008 +0100 Clean up generated files and put *.in files in the tarball. Make sure to clean up all generated files on "make clean". Don't distribute generated files in the dist tarball, only the *.in files. Add generated files to .gitignore. Use consistend naming for the install dirs. Install defaults file as data file. Improve in_files handling a bit. commit 4d455cec32aefbd9bbc89587fb5676e280e76914 Merge: 30ce87e 03a59b3 Author: Victor Lowther Date: Wed Feb 13 20:52:34 2008 -0600 Merge branch 'master' into vlowther-move-pm-main Conflicts: pm/functions.in src/pm-action.in commit 03a59b39d415366cb7068886f103db8fa6ef6aac Author: Dan Nicholson Date: Wed Feb 13 11:52:18 2008 -0800 More descriptive autogen output for missing autotools In the case that autoreconf is missing, we can prompt the user which packages will be needed (autoconf and automake). Otherwise, we'll just have to rely on the error output from autoreconf, which should be sufficiently useful. commit 6337e09082a70861fb2314c8c2ebecddb3698808 Author: Dan Nicholson Date: Thu Feb 7 10:49:26 2008 -0800 Much simpler autogen.sh for our needs The current autogen.sh script had way too much baggage for what we use in pm-utils. My guess is it was copied from a GNOME package. Anyway, this slims down autogen.sh to just use autoreconf, which will do the right thing. This autogen.sh is a virtual copy of the "official" script used in Xorg. commit dc910a771f41ddae9f162d2e5fbde4e95dd715b3 Author: Victor Lowther Date: Wed Feb 13 11:24:22 2008 -0600 Added a readme describing how to use s2ram/s2both's internal video quirk handling. commit ca6511884ef1623781c82e9f420337cb2340cbc4 Author: Victor Lowther Date: Tue Feb 12 19:31:57 2008 -0600 Fix thinko in 99video w.r.t framebuffer console states. commit 02e9623c6f0adb3c3b6c03d77bbfaff1c4434744 Author: Victor Lowther Date: Tue Feb 12 08:51:16 2008 -0600 This patch adds framebuffer console handling routines. It is the only thing that we were missing from the s2ram tools. commit d5907c546116762cbb1f50b362fe163caed97c78 Author: Victor Lowther Date: Mon Feb 11 18:49:43 2008 -0600 Moved the SLEEP_FUNCTIONS declaration to after where we load defaults. commit 982ccdf2b02742bfdcd8e8bdd7e1a3ebe8856ec8 Author: Victor Lowther Date: Mon Feb 11 18:26:54 2008 -0600 Added a check for /dev/snapshot when using uswsusp. commit e55fd77ebd34da61718bda8e698bbb9c4c8add14 Author: Victor Lowther Date: Mon Feb 11 17:30:55 2008 -0600 On second thought, we don't need to mess with s2ram when using uswsusp. commit fa95410cff8fb0837b07d02c702f9a9b7e152c4b Author: Victor Lowther Date: Mon Feb 11 16:46:25 2008 -0600 Add more paranoia to check_suspend_hybrind in uswsusp. commit 58f482cc83d892d0cfd32d2fb0114148d9b17b48 Merge: 25c7ae7 5a7cb8d Author: Victor Lowther Date: Mon Feb 11 16:25:09 2008 -0600 Merge branch 'master' into vlowther-even-simpler-sleep-modules commit 25c7ae741c74c59361946af749f120787db7caa0 Author: Victor Lowther Date: Mon Feb 11 16:24:46 2008 -0600 Added completely untested uswsusp support. Use at your own risk. commit 5a7cb8d1fb6fe8068aea8ec904161c6dc912711b Merge: 2ff6d1b 1049641 Author: Victor Lowther Date: Sun Feb 10 21:58:38 2008 -0600 Merge branch 'vlowther-security-fixes' commit 2ff6d1b801dab07a75eaa9cf773134574014180f Merge: 1b2828a ad92f81 Author: Victor Lowther Date: Sun Feb 10 08:51:01 2008 -0600 Merge branch 'master' into vlowther-simpler-hooks commit 104964140b8c896c1bf1cdace338e509ea3544f1 Author: Victor Lowther Date: Sat Feb 9 20:13:08 2008 -0600 pm-is-supported.in needs to be tranformed before it can run. Update the permissions to reflect that. commit 84d971f5000e400894e7a1fbbb4397cd7c09d7cd Author: Victor Lowther Date: Sat Feb 9 20:12:08 2008 -0600 No need for extra x's in comparisons in pm-powersave.in commit f3fa39954440adf512b624e137e2d181dc24939b Author: Victor Lowther Date: Sat Feb 9 20:09:38 2008 -0600 Should be ${REVERSE}, not {$REVERSE} in pm-action.in I am so embarrased. commit eb6035a9f7b159927de5a24e7a7ef2c2f700e4c2 Author: Victor Lowther Date: Sat Feb 9 20:06:22 2008 -0600 Minor quotation updates in on_ac_power commit bba04875dbef9343612e3aec2ee9c67d05b0d51e Author: Victor Lowther Date: Sat Feb 9 20:04:02 2008 -0600 Reverse ordering of the if command_exists ... in 20video This brings this hook inline with 99video, and is easier to read. commit ebcb472fe233a2b215ada2ae94a71293a8e10636 Author: Victor Lowther Date: Sat Feb 9 20:00:04 2008 -0600 Minor quotation fixes in 99video commit 1f4cae1db1ff4a9f42b9d1194562e69244864879 Author: Victor Lowther Date: Sat Feb 9 19:57:39 2008 -0600 Removed unneeded redirect on 95led. commit 7ba73da6e6926bd574e54bce93ff2d8f14bf8b58 Author: Victor Lowther Date: Sat Feb 9 19:56:26 2008 -0600 Minor quotation fix in 94cpufreq. commit 07bec2d38626067358fc84675a1e526f69ab86b0 Author: Victor Lowther Date: Sat Feb 9 19:54:01 2008 -0600 90clock updates Modified 90clock to pass just a filename to the locking functions, and to get rid of an unneeded return command. commit b58256a2505e1116be1090741472285959c58bbc Author: Victor Lowther Date: Sat Feb 9 19:48:07 2008 -0600 No need for extraneous redirects in 05led any more. commit ad1dd3c2c9280c3d432b6da9a530e060287fc40f Author: Victor Lowther Date: Sat Feb 9 19:46:29 2008 -0600 Added missing ;; in a case statement in 01grub commit 7d3bbfdd70a4dcc4c0f1717c34c45a585675c6b7 Author: Victor Lowther Date: Sat Feb 9 19:42:36 2008 -0600 Get rid of redundant return command in toxonice. commit f8fd6a4fb0301b4e3e2767b06e2b561f1b15f7a1 Author: Victor Lowther Date: Sat Feb 9 19:39:56 2008 -0600 Minor correctness updates Mostly quotation fixes and the like. commit f0162d97d03f6ceaaea581a61ee6cfb2f335c331 Author: Victor Lowther Date: Sat Feb 9 19:32:01 2008 -0600 Verify ownership of pm-utils sourced or executed files When sourcing or executing something that is a part of pm-utils, make sure we user running pm-utils owns it instead of just checking that it exists. commit 0debc2e54d173fe88b739394fb3a5b0cb0b8be7c Author: Victor Lowther Date: Sat Feb 9 19:20:48 2008 -0600 Make locking and unlocking not accept arbitrary paths. This removes the ability for someone to thoughtlessly overwrite something critical when trying to take a lock. commit eb86a98f2778fcbc373fd2579f0f6e2c2e3007dc Author: Victor Lowther Date: Sat Feb 9 19:06:15 2008 -0600 Do not init the logfile until after we take the suspend lock. commit 7dbbc618a3e7ff83393666df3ee9289ae1d7a32d Author: Victor Lowther Date: Sat Feb 9 19:05:03 2008 -0600 Made init_logfile a little more paranoid about what it overwrites. commit ad92f817445390525e66b40ac8d9906e58f99810 Author: Victor Lowther Date: Sat Feb 9 16:21:24 2008 -0600 Added slightly more explanatory note on configuring tuxonice. commit 8b8038ea2edd07bcc3df7f2c79e664979ec4c795 Merge: 3c1b3c0 70dee98 Author: Victor Lowther Date: Sat Feb 9 16:06:37 2008 -0600 Merge branch 'master' into vlowther-even-simpler-sleep-modules commit 3c1b3c0de9685ca3430d8a4b9409958254fe0c65 Author: Victor Lowther Date: Sat Feb 9 15:58:34 2008 -0600 Revert "Merge branch 'vlowther-simpler-hooks' into vlowther-security-audit" This reverts commit 314d2025e30c71e9bdb482191527378ec56ab7b0. commit 314d2025e30c71e9bdb482191527378ec56ab7b0 Author: Victor Lowther Date: Sat Feb 9 15:47:04 2008 -0600 Merge branch 'vlowther-simpler-hooks' into vlowther-security-audit Conflicts: pm/HOWTO.hooks pm/functions.in pm/sleep.d/Makefile.am commit 70dee9897723db36c2c0a3b83ff8510072a41aa6 Merge: da9134c 347e419 Author: Victor Lowther Date: Fri Feb 8 19:51:45 2008 -0600 Merge branch 'master' into vlowther-debugging-hooks commit 6cbca38eb26a5b1a356abe3e0da106e0124f213d Author: Victor Lowther Date: Fri Feb 8 19:44:58 2008 -0600 add TODO about a needing a configuration mechanism for tuxonice (and, by extension, the rest of the sleep modules) commit 4084624c55b70acb69d93ffb553d0792fb495705 Author: Victor Lowther Date: Fri Feb 8 19:34:34 2008 -0600 Added a HOWTO.modules for writing sleep modules. commit 66f32534a8d39c0f49cc5c78393da3222858596d Merge: d3b75b0 347e419 Author: Victor Lowther Date: Fri Feb 8 19:04:11 2008 -0600 Merge branch 'master' into vlowther-even-simpler-sleep-modules commit 1b2828a4abd7d160f273c1fbb3c47ff37291195f Merge: d76c106 347e419 Author: Victor Lowther Date: Fri Feb 8 18:56:26 2008 -0600 Merge branch 'master' into vlowther-simpler-hooks commit 30ce87e6e801060653b450f5452619eb47f63082 Merge: 380bae1 347e419 Author: Victor Lowther Date: Fri Feb 8 18:52:52 2008 -0600 Merge branch 'master' into vlowther-move-pm-main commit da9134ce814cb70db21be481607067d59d57682c Author: Victor Lowther Date: Fri Feb 8 18:06:20 2008 -0600 Added a little script to build and install pm-utils in a temp directory. commit d8dcc81a0fa75b9a43bf5caf3d5b2fc21ee31520 Author: Victor Lowther Date: Fri Feb 8 17:32:38 2008 -0600 If PM_DEBUG = true, then set -x in functions. This will store trace logs in the logfile. commit d3b75b018a1f04fc6169616f3b5aa89f85197c01 Author: Victor Lowther Date: Fri Feb 8 14:04:25 2008 -0600 Dan Nicholson suggested changes -- get rid of some unneeded return $?, and modify the Makefile.am to simplify it. commit d76c10655080ee7a949841b1511f47ac13436999 Author: Dan Nicholson Date: Wed Feb 6 12:56:03 2008 -0600 Move the actuall hook running into a subshell. One less place for future maintainers to forget to change IFS back. commit 558c2fbfb3157a0d18d66dd8b6b34a2c24c61164 Author: Victor Lowther Date: Tue Feb 5 16:09:04 2008 -0600 Simplify hook implementation. modified: pm/HOWTO.hooks modified: pm/functions.in modified: pm/sleep.d/Makefile.am deleted: pm/sleep.d/zzz * Merge the functionality of find_hooks and run_hooks. This results in a new run_hooks function which is much simpler than the old one and is much more resistant to breaking due to odd filenames. * Actually implements the functionality mentioned in README where you can create a nonexecutable file in /etc/pm/(sleep|power).d that will prevent the copy in /usr/lib/pm-utils/(sleep|power).d from running. * Undoes the "nonzero exit code means do not run on resume" and auto-reverse pseudofeatures I added in the POSIX series. If anyone likes them, they can be added back at the cost of either passing a function to run_hooks or maintaining a global variable. * Merges the functionality that was in zzz back into pm_main. Although zzz was a slightly funny name, upon further reflection it was a bad idea and makes it harder to implement some partitioning of functionality that will be needed if/when the hooks are split into their own project. * Updates the documentation to reflect these changes. commit 537449f1acb100d5a49aa314cc40afaa7ef1ccae Author: Victor Lowther Date: Thu Feb 7 14:23:31 2008 -0600 Added tuxonice support to modular sleep branch commit 64c5393ce7d5ad02f773d11aa3d2cf307393fc08 Author: Victor Lowther Date: Wed Feb 6 12:07:48 2008 -0600 ...and make it check in the case statement too. :| commit 5ca9d9514c09b2d83808ffa4e2ca0b8c64d1fe4c Author: Victor Lowther Date: Wed Feb 6 12:06:17 2008 -0600 Make pm-is-supported translate $ACTION correctly. commit a92675f0a02396494b7e5d58fa7ea841ccbe0cc5 Author: Victor Lowther Date: Wed Feb 6 10:36:16 2008 -0600 Even simpler modularization of sleep methods. This splits the actual functions that perform the sleep/wakeup into a file which is sourced, adds an environment variable which controls which module is sourced, moves the check functions into the sleep module, modifies pm-action and pm-is-supported to take these changes into account, and modifies the automake machinery to take these changes into account. commit 380bae163b946840e735c982974e232ec6b2e678 Author: Victor Lowther Date: Wed Feb 6 23:00:48 2008 -0600 Followup to the last patch. Sunce we moved pm_main functionality to the only place it is actually used, remove it from functions. commit a9169f14d8000709d23e70ebed783070000d9374 Author: Victor Lowther Date: Wed Feb 6 22:58:57 2008 -0600 You know, the original reason pm_main was moved to functions is because it was shared between pm-suspend and pm-hibernate. Since all those scripts are not symlinks to pm-action, we do not need a pm_main in functions cluttering up the namespace. This patch clones pm-main functionality in pm-action commit 347e419b1e55bd9293b80831e661cc410123ef7c Author: Dan Nicholson Date: Wed Feb 6 09:56:51 2008 -0800 pkg-config file to support 3rd party programs A pkg-config file has been added to allow 3rd party programs to find out about the user's pm-utils installation. This means they can make an informed decision about where to install a sleep hook, for instance. commit 8df496aeffe3a7114fa01912d7605693c5bc64b9 Author: Dan Nicholson Date: Wed Feb 6 10:01:51 2008 -0800 Make distcheck work None of the EXTRA_DIST files actually exist, causing `make distcheck' to fail. commit 480fc5ffacd8292afd72114fe13ee1f4c71d29bb Author: Dan Nicholson Date: Wed Feb 6 09:58:38 2008 -0800 Ignore generated files commit 7b36dd7d2a95170f1bb676b2faf39159112accb3 Author: Victor Lowther Date: Mon Feb 4 15:59:53 2008 -0600 Removed executable bits on the *.in files to emphasize their non-executability. Added an executable bit on src/pm-is-supported becaues it is. commit c14bf0f13d2f0c971ab12716e8fb1fbad18df3fa Author: Victor Lowther Date: Mon Feb 4 12:22:52 2008 -0600 Fix double-quotes introduced by previous changes. commit 0b47c3f1651aa31a827c2ac19d3df445b8280a6a Author: Victor Lowther Date: Mon Feb 4 12:21:50 2008 -0600 Revert "Revert "Moved text substitutions for automake to the top of pm/functions.in,"" This reverts commit 1a682643d705efade2cea6322638662d238d2d66. commit 1a682643d705efade2cea6322638662d238d2d66 Author: Victor Lowther Date: Mon Feb 4 12:20:59 2008 -0600 Revert "Moved text substitutions for automake to the top of pm/functions.in," This reverts commit d752433234db1de35de6256a39d84af2719c5ae2. commit d752433234db1de35de6256a39d84af2719c5ae2 Author: Victor Lowther Date: Mon Feb 4 12:20:18 2008 -0600 Moved text substitutions for automake to the top of pm/functions.in, and export them as environment variables. commit e21eff8128eb04e61132c33cef2a36e6fef72765 Author: Victor Lowther Date: Sat Feb 2 12:50:44 2008 -0600 Add cleanfiles in Makefile.am, and actually export PM_FUNCTIONS in pm-powersave commit 8ae41d104086544631aaf76fd213c5ae8a32de64 Author: Victor Lowther Date: Sat Feb 2 12:45:03 2008 -0600 Use autotools to make pm-action and pm-powersave location independent. commit f1c9c11681680e059abc0bb56f0b20a726c29f91 Author: Victor Lowther Date: Sat Feb 2 10:10:54 2008 -0600 Renamed pm-powersave in preperation for making it location-independent. commit 7616c68a5aed5caf806056b6dd2d47a2f68950ad Author: Victor Lowther Date: Sat Feb 2 10:07:29 2008 -0600 Renamed pm-action in preperation for making it location independent. commit eb9e9de8b93c03a554461f0d1eeea1dba0c78f97 Author: Victor Lowther Date: Sat Feb 2 10:06:24 2008 -0600 Modify src/Makefile.am in preperation for making the pm-action scripts location independent. commit 349c2e5a0c7ab1c81be31eeae2d633935d1823a2 Author: Victor Lowther Date: Sat Feb 2 12:39:57 2008 -0600 Use autotools to make functions location-independent. commit a50dc9e1dd0b267cbc67eb34913d2f427a618671 Author: Victor Lowther Date: Sat Feb 2 09:47:39 2008 -0600 Rename functions in preperation for autotools based location independence commit 7dcff332d16522b7e5f69839b279576b70b5a0f0 Author: Victor Lowther Date: Sat Feb 2 09:34:29 2008 -0600 Added support for transforming .in files in pm/Makefile.am commit ed60581bb7ff249ae9cf509c5937929af1f85c47 Author: Victor Lowther Date: Sat Feb 2 12:21:46 2008 -0600 Modified hooks to source $PM_FUNCTIONS instead of /usr/lib/pm-utils/functions commit 7b30515881b033ed2d1e4e11f3c8b3bc5e205683 Author: Victor Lowther Date: Sat Feb 2 12:14:31 2008 -0600 Update pm-powersave to export the location of pm/functions in PM_FUNCTIONS commit fa5cbe713ac0360ecdeb6f6dae1a12ab8ed53dbf Author: Victor Lowther Date: Sat Feb 2 12:11:49 2008 -0600 Export location of pm/functions from pm-action commit 5953cb0f775e2fe66d74ba8f0581ee8eb00e8393 Author: Victor Lowther Date: Thu Jan 31 16:08:57 2008 -0600 CPUfreq fixups: Only look at cpus that have an active governor Fix inverted conditional when checking to see if we should restore a governor 99video vixes: I had the tests backwards for the vbe|radeon helpers backwards. Woe is me. Overall: Minor quotation fixes. commit 5d1e6ad771b709bcbeb67b9c165160b95ab0dc0f Author: Victor Lowther Date: Wed Jan 30 18:52:11 2008 -0600 Spelling fixes in HOWTO.hooks. commit f2746047eefdd3a95bc781436e809721c65f6fa6 Author: Victor Lowther Date: Wed Jan 30 16:01:57 2008 -0600 Actually fix typo in 99video My git-rebase fu is weaker than I thought. commit 4464450b8af957886d7af656a6b38b634a7a4f6f Author: Victor Lowther Date: Wed Jan 30 14:46:34 2008 -0600 Simplify the implimentation of command_exists commit fac162b407e86dc5719c978dedd1277e216d255b Author: Victor Lowther Date: Tue Jan 29 15:16:24 2008 -0600 Added entries in .gitignore to ignore vim backup and swap files. commit 125d51f86d6acb7f5b61da798777a1a58f96f898 Author: Victor Lowther Date: Tue Jan 29 15:14:48 2008 -0600 Made zzz executable. commit a2dedcabe14d9ae537e5106b597fe80edd4c025c Author: Victor Lowther Date: Tue Jan 29 15:13:38 2008 -0600 in 94cpufreq, just exit outright if /sys/devices/system/cpu/ is not present. commit 3d56eb2cd40e1ee955d915474c1d38efe5de42bd Author: Victor Lowther Date: Tue Jan 29 14:47:49 2008 -0600 Don't do anything in 65alsa if there is no alsactl command. commit a6456ef1218721f18778b1493a19ce7f5d418a4e Author: Victor Lowther Date: Tue Jan 29 14:46:08 2008 -0600 Deleted commented-out commands, minor quotation fixes to 55battery. commit 722439bb487e90a8c82a1c58c7bf3f1883be1f26 Author: Victor Lowther Date: Tue Jan 29 14:42:12 2008 -0600 move the sanity check in 49bluetooth outside the suspend function. commit c9b80d9f2690bc923ccf4beca0559c061c9dc8f6 Author: Victor Lowther Date: Tue Jan 29 14:39:50 2008 -0600 Do not do anything in 10NetworkManager if dbus-send does not exist. commit fa58fea16a6ac1dca30961f50b19fa07198ca85e Author: Victor Lowther Date: Wed Jan 30 15:50:11 2008 -0600 Added a HOWTO file for writing hooks, modified 99video to fix a typo. commit 434e1b85f571e3ecbb8b7e43f93ce5de922f587c Author: Victor Lowther Date: Tue Jan 29 14:37:20 2008 -0600 Use the command_exists utility function instead of directly calling type thing |grep -q "not found". commit ccf72b774837ac9fdd5a56054376e2939a8a32ee Author: Victor Lowther Date: Tue Jan 29 14:32:27 2008 -0600 Add a function to test for the existence of a command, either a function, executable, or shell builtin. commit fd9ee75a77bf14c9826fadefb66e86af98360f03 Author: Victor Lowther Date: Tue Jan 29 14:28:29 2008 -0600 Make 05led exit 1 iff we are not running on an IBM system. This will cause it to be skipped on resume if we are on a system that does not need it. commit 21cc1e1c172b6fa2bd282c41b1fbccc48e608b1c Author: Victor Lowther Date: Tue Jan 29 13:55:17 2008 -0600 Get rid of extraneous shell evals. The commands will have their output redirected appropriately. commit 8189f4e999f8da778754d4aa7f77f92e0a526a4a Author: Dan Nicholson Date: Tue Jan 29 21:36:44 2008 +0000 Earlier Victor and I discussed moving the sleep after the check in spin_lock(). That got lost in the shuffle, so here's a new patch. commit 4b62a077eda4cf0055ca50225e50d7d581669d1c Author: Nigel Cunningham Date: Tue Jan 29 21:12:27 2008 +0000 Here's a new patch (this time against current git) to enable suspend-to-both support if we have suspend-to-ram and TuxOnIce. commit dd55c3a612b9393b1600cfff1c647b0c4d0823ae Author: Till Maas Date: Tue Jan 29 20:48:09 2008 +0000 apply an updated version of 5a5e848b49e33ebf538953bdd132e8ccb0d7377b commit d01d5cb977b7b56e1eea5168e8ea699039aa6a9f Author: Richard Hughes Date: Tue Jan 29 20:46:56 2008 +0000 Revert "Here is now a patch agains pm-utils git with /var/run/pm-utils/lock as" This reverts commit 5a5e848b49e33ebf538953bdd132e8ccb0d7377b. commit 0de89bf5f75ac3ba46f464f51e46c416ad0781ef Author: Michael Biebl Date: Tue Jan 29 18:27:31 2008 +0000 Instead of duplicating the checks in pm-action, simply call pm-is-supported. Add also initial support for the --suspend-hybrid command (The actual implementation of do_suspend_hybrid is still tbd). commit a89c9649210479110f4af37f27b905434920f607 Author: Victor Lowther Date: Tue Jan 29 18:24:41 2008 +0000 Patch attached to do the appropriate redirection for pm-powersave. commit 5a5e848b49e33ebf538953bdd132e8ccb0d7377b Author: Till Maas Date: Tue Jan 29 18:22:28 2008 +0000 Here is now a patch agains pm-utils git with /var/run/pm-utils/lock as lockfile. It also makes sure that /var/run/pm-utils, i.e. the directory for the lockfile is generated, and it uses variables for the directories to store state and service information and creates/removes them properly. They are now subdirectories of /var/run/pm-utils. Also it moves the take_suspend_lock() line back to its original place, one of the other patches moved it to the wrong location within the funtions file. commit 761e76c6ea2ee9acfd62efc343aebf8238761ec4 Author: Victor Lowther Date: Mon Jan 28 22:54:20 2008 +0000 That reminds me, the -- in that tr command paramater is a GNUism, and I should remove it. commit ea744ea29552cb068bf3c05ecf80d2a8d336848b Author: Victor Lowther Date: Mon Jan 28 22:53:28 2008 +0000 This patch modifies the module unload/reload code to be POSIX compliant, and includes a minor quotation fix in on_ac_power. commit dba53342fd80a01f8d932b8d32a0057562128ab7 Author: Michael Biebl Date: Mon Jan 28 21:15:54 2008 +0000 remove obsolete .cvsignore files commit e823b31b36dd995e048731394a4428c4431d1650 Author: Michael Biebl Date: Mon Jan 28 21:00:14 2008 +0000 /etc/pm/config is no longer supported commit f05e855408a8e408f9175877f5f623abf0cd03ad Author: Richard Hughes Date: Mon Jan 28 20:54:08 2008 +0000 fix the gitignore, oops commit 05ffa5cb342bd850abd719f02d5a6ba1ba31fe29 Author: Victor Lowther Date: Mon Jan 28 20:52:12 2008 +0000 Use file globbing instead of trying to parse the output of ls, change default governor from userspace to performance because performance is the compiled-in default for just about everything that uses cpufreq. commit 145ebf1c3fa5fc11ee49ccfc652a5384bd157ea0 Author: Victor Lowther Date: Mon Jan 28 20:49:52 2008 +0000 Modify the ntpd handling to use the generic locking infrastructure, tab fixes. commit 6721d29724b62be596e56db9026e1c27c112819d Author: Victor Lowther Date: Mon Jan 28 20:48:56 2008 +0000 If there is no state to save when running the ibm bluetooth hook, then don't do anything instead of saving state that says there was no state to save. commit 9f6e1f5911168ce032e04f7a0f9ddc5ed67495bb Author: Michael Biebl Date: Mon Jan 28 20:47:29 2008 +0000 This patch got rid of one usage of the usleep function. usleep is redhat only ttbomk, so it's safer to simply use sleep. This patch replaces the remainig usleep in 99video with sleep. commit 2963a225debe23edef4ec71049567ec01a6dda0c Author: Victor Lowther Date: Mon Jan 28 20:46:33 2008 +0000 Modified the main suspend/resume function to use the new locking infrastructure. commit 7041cdf6063e4f7d705537f083f877fae1255e68 Author: Victor Lowther Date: Mon Jan 28 20:45:01 2008 +0000 nullglob is a bashism. POSIX does not have it, and the previous patches have gotten rid of our dependency on it. commit dc6944d6dbce95db990b136ea446d6067f8d60a4 Author: Victor Lowther Date: Mon Jan 28 20:43:53 2008 +0000 Modify the hook-running infrastructure to be generic and to be POSIX-compliant. Modified pm_main to use the new hook-running infrastructure. commit 42e534c0c467e6bb895cf493da373b7675fe2be6 Author: Victor Lowther Date: Mon Jan 28 20:41:11 2008 +0000 Adds a generic locking mechanism built around directory creation/removal. commit 4a8036a4185ad32c4f7d2cedbe6ef3bf76948b97 Author: Richard Hughes Date: Mon Jan 28 20:38:32 2008 +0000 two more things in gitignore commit 6c4f5b58e6ce915c96f29935f2f719f39586f378 Author: Victor Lowther Date: Mon Jan 28 20:37:02 2008 +0000 Make condition checking in (20|99)video POSIX compliant, and modify vbe() and radeon() to only check for the existence of (vbe|radeon)tool once per hook invocation instead of once per function invocation. commit 9e058adb8718d3682c8a5b861e3f8796e4e3bbdb Author: Victor Lowther Date: Mon Jan 28 20:35:53 2008 +0000 Rewrite service and state handling to make POSIX compliant and to get rid of potential eval-related security holes. commit b60758f2b8f25dffab5aa74547c8c6cdf0d3eca1 Author: Victor Lowther Date: Mon Jan 28 20:02:53 2008 +0000 Minor updates to README -- /etc/pm/hooks has not existed in a long time. commit 1bc5e0cff57d33580bd07334dae5d4cb5c260e18 Author: Victor Lowther Date: Mon Jan 28 20:01:04 2008 +0000 Add entry for myself in AUTHORS commit 9785a16e5619b51d89343d290b9cae14bde2a954 Author: Victor Lowther Date: Mon Jan 28 19:59:34 2008 +0000 All scripts are now POSIX compliant, change shebang lines to have them run under /bin/sh instead of /bin/bash. Also take care of a few more minor fixups. commit 103ac946fc745e048736b78bd50d0dcc5dcb5da7 Author: Victor Lowther Date: Mon Jan 28 19:58:11 2008 +0000 Simplify parameter expansion in pm-action and pm-is-supported. commit 96560c7ef164c756669f22df2b9d198bf3731100 Author: Victor Lowther Date: Mon Jan 28 19:56:36 2008 +0000 Made config file loading POSIX-compliant and got rid of a redundant local variable in the config file loading function. commit b8b5c82c09a9b48cbadaa8c2cdb993f79bfee09d Author: Victor Lowther Date: Mon Jan 28 19:55:32 2008 +0000 Modified pm-powersave to use the new hook-running infrastructure instead of including a duplicate copy of its own. commit a7608722ff88455a99a0efc139fa285acad815d7 Author: Victor Lowther Date: Mon Jan 28 19:52:14 2008 +0000 remove sysfont wrapper call. no other distro from fedora uses it On Jan 28, 2008 11:31 AM, Dan Nicholson wrote: > On Jan 27, 2008 9:42 PM, Vasiliy G Tolstov wrote: > > Gentoo does not have this utilities. Default gentoo init script that > > setting console font executes /bin/setfont > > That's because setsysfont is a Fedora specific wrapper script around > setfont in their initscripts package. > > http://cvs.fedoraproject.org/repo/pkgs/initscripts/initscripts-8.60.tar.bz2/a0e888cc91ef6350a991985567d21366/initscripts-8.60.tar.bz2 In that case... Patch attached to remove 60sysfont. setsysfont is Fedora-specific, and other distros do not use it. commit 2af15dbd00801c55f7683ec8eabb3d9cba3023af Author: Till Maas Date: Sun Jan 27 10:40:04 2008 +0000 This patch makes it possible to use a different hibernate mode, valid modes are according to Documentation/power/interface.txt platform shutdown reboot testproc test Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=375701 commit 40d7d07afd59fde567c36a6f684ff329fd1394bb Author: Till Maas Date: Sun Jan 27 10:38:50 2008 +0000 Set the sort order in functions instead of pm-action. commit de1ace906a3c99b01996b7a0e8dfabcabf0262c9 Author: Richard Hughes Date: Sat Jan 26 18:06:26 2008 +0000 rename hooks into sleep.d -- this is something we have wanted to do for a long time, but CVS made it hard commit 67645abd5351105a1d18f8615e789c4234e0d480 Author: Richard Hughes Date: Sat Jan 26 17:50:24 2008 +0000 add the .gitignore files to ignore the build stuff commit a1e346dd88820b75f0e8d28f3c9ffb9b3604e4cf Author: Richard Hughes Date: Sat Dec 29 11:58:18 2007 +0000 2007-12-29 Richard Hughes * pm/functions: * src/pm-powersave: Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=302401 (Issue 2 in the bug report) Without the uniq files in the sleep.d or power.d directory may run twice. Also this patch removes a uneccessary -e test in the if statements, the -x test already includes a -e test. Also this patch adds a modeline for vim no to expand tabs, because tabs are used in the files for indentation. From Till Maas , many thanks. commit d2d72cb5c174e0873530773a1e371c2310809c6b Author: Richard Hughes Date: Sat Dec 29 11:56:31 2007 +0000 2007-12-29 Richard Hughes * pm/functions: * src/pm-powersave: Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=302401 (Issue 1 in the bug report) This patch makes sure that the nullglob option is set. This makes sure that the result of a filename expansion is empty, when the pattern does not match. From Till Maas , many thanks. commit 003f29807f418cd4bd14fb51569b5b95a2d9dfa5 Author: Richard Hughes Date: Sat Dec 29 11:54:57 2007 +0000 2007-12-29 Richard Hughes * src/pm-action: This patch makes pm-action show the filename in help, that was used to invoke it, e.g. pm-suspend From Till Maas , many thanks. commit 88d3e5a21878e22f0c6e13f656417eccd4750be9 Author: Richard Hughes Date: Sun Dec 23 23:03:12 2007 +0000 2007-12-23 Richard Hughes * man/pm-pmu.1: * man/pm-pmu.sgml: Fix a typo in the pm-pmu manpage. RedHat Bugzilla report: https://bugzilla.redhat.com/show_bug.cgi?id=286201 commit aac703ae48779eab946664035c9e7aa2d079b43d Author: Richard Hughes Date: Sun Dec 23 23:01:45 2007 +0000 2007-12-23 Richard Hughes * pm/functions: There is no need to remove the logfile, because the '>' after exec in the next line already truncates the logfile to zero length. Also removing is wrong, because it destroys the selinux context of the logfile. Bugzilla Reports: https://bugzilla.redhat.com/show_bug.cgi?id=237840 https://bugzilla.redhat.com/show_bug.cgi?id=238068 commit ca7e573f6eecf69148cb20d1868b0a72dfc6a78c Author: Richard Hughes Date: Sun Dec 23 22:57:21 2007 +0000 2007-12-23 Richard Hughes * pm/functions: - Check for the individual config file, not the list. commit 573b8d21d74958a5db0736430075e520d84ea126 Author: Peter Jones Date: Mon Sep 10 21:15:06 2007 +0000 - remove laptop-tools here commit a6989776ce2e519441ce05f73a0528f8b71f5429 Author: Peter Jones Date: Mon Sep 10 21:10:23 2007 +0000 - bump minor rev commit b373a9a25c57eda819a75fca94dffcb85d712c83 Author: Peter Jones Date: Mon Aug 13 17:38:51 2007 +0000 Remove laptop-tools entirely, it doesn't make any sense (rhbz#251617) commit 86e6293f468c627970ce8e5356c29b5c4d98491a Author: Peter Jones Date: Mon Jun 18 20:42:36 2007 +0000 - Add support for "--quirk-reset-brightness" (fixes the Fujitsu Lifebook S7110) commit 29ab136954604b2f12f729d0aaac6f685c46700c Author: Richard Hughes Date: Mon Jun 4 15:50:30 2007 +0000 2007-06-04 Richard Hughes * pm/hooks/20video: We are not turning off the DAC and light in 20video, but we are turning it on in 99video. Fix. commit d9ce933889678092cd4d932c023c95e58387325d Author: Peter Jones Date: Tue May 15 15:04:28 2007 +0000 - make man pages not get cleaned up by "make clean" commit b91649705a335a6896153ab26f5ee0b008bab150 Author: Peter Jones Date: Tue May 15 14:57:02 2007 +0000 - fix exports of config variables commit eb463888c27f9c5214db479e1bedbfb9bb29eb65 Author: Peter Jones Date: Wed Apr 25 17:30:31 2007 +0000 - this redirect is bogus commit 40197ee4908b825643ee281ecdc705ef7e1a93a3 Author: Peter Jones Date: Mon Mar 26 14:18:07 2007 +0000 - fix source_configs to not error when the config dir is empty commit 60aa6beb5383c609b39c74c0fad94b8ab9f18ef5 Author: Peter Jones Date: Mon Mar 26 14:06:35 2007 +0000 - bump version, add changelog commit 2637da98f775fbedb1c1898aad3eab379adbf2eb Author: Peter Jones Date: Fri Mar 16 16:19:58 2007 +0000 - work around broken regexps in some versions of bash, also fewer forks ;) (patch from Stefan) commit fa4c8e2ecbce89a82d83ef9e41c1d37d18d8e985 Author: Peter Jones Date: Fri Mar 16 15:12:23 2007 +0000 - get rid of the complicated config stuff; the new layout obviates the need for it (patch from Stefan) commit cd7a9f1167274cf0c14c88c47fdd59218e5f7d8c Author: Peter Jones Date: Thu Mar 15 00:42:56 2007 +0000 fix typo commit 5ea16a96f795e47756ef372b415020c743354d19 Author: Peter Jones Date: Wed Mar 14 17:16:45 2007 +0000 - fix path for 'functions' commit 38f98cdf639b69a6a7896753691d8a6a78a50669 Author: Peter Jones Date: Wed Mar 14 16:40:30 2007 +0000 - use 'service' rather than calling init.d files directly commit 264aea5efe616901dcf8183d428ae4a43d9b2a5a Author: Peter Jones Date: Wed Mar 14 15:37:04 2007 +0000 - Fix cpufreq save/restore on multi-core cpus commit 7c8e24b2fd81d77f1bf6a622eb2471c0e0f2d807 Author: Peter Jones Date: Wed Mar 14 15:25:24 2007 +0000 -fix service restarting with . or - in the name commit dbac0970155f07841fb2280a48c2c1079d6b79fd Author: Peter Jones Date: Wed Mar 14 15:07:11 2007 +0000 - don't remove "button" any more. commit ff83e338fbe5688c7c3e949a837e748f55e98d6c Author: Peter Jones Date: Wed Mar 14 15:06:19 2007 +0000 - pm-reset-swap fixes from stefan commit b85e949dadef4732847ba1f114bc325b7c19393f Author: Peter Jones Date: Wed Mar 14 14:49:44 2007 +0000 -add warning comment in defaults commit e540e66d3485fa4cf554504f1390cbcbd58812c9 Author: Peter Jones Date: Tue Mar 13 14:22:53 2007 +0000 - ... I thought that would work. commit 054ad212230a8b39dfa2c9c20aa2c737b28b95a7 Author: Peter Jones Date: Tue Mar 13 14:20:04 2007 +0000 - fix pm-is-supported installation commit 09be37709a04eb7b336edecb56e747b90b29f0db Author: Peter Jones Date: Tue Mar 13 14:06:51 2007 +0000 - er, make it .2 commit f1e2558091a9e94321d75ad1ff7bb768507fd33d Author: Peter Jones Date: Tue Mar 13 14:06:21 2007 +0000 - bump version commit faffa6b4fb3cfbd2df7f861cc121dd4ff36739cb Author: Peter Jones Date: Tue Mar 13 14:05:51 2007 +0000 - add pm-is-supported - add pm-suspend-hybrid commit 428355d0870d7c4419a00753e9297e8160602784 Author: Peter Jones Date: Tue Mar 6 19:59:05 2007 +0000 - add /usr/lib/pm-utils/bin to $PATH commit 5a3c8ac03bcc3ae0c19bbea72b9936efd37c580e Author: Peter Jones Date: Tue Mar 6 19:55:31 2007 +0000 - get the path for "functions" right. commit dd5a52d9c316eb52a9c652a8e6fe5f5d23f39ce2 Author: Peter Jones Date: Tue Mar 6 19:37:17 2007 +0000 - I'm really not even sure why these are version controlled... commit 6b2c9bc624a8efba20501aca91930080a177db9a Author: Peter Jones Date: Tue Mar 6 19:35:59 2007 +0000 - make sure pm-action is bundled in commit 38ad105a26a49f01d4a88d9d40c77c955be48cda Author: Peter Jones Date: Tue Mar 6 19:20:25 2007 +0000 - fix path here, too commit e6dce8f52f2f1e4e546c21b0b415aef58f0dda69 Author: Peter Jones Date: Tue Mar 6 19:20:06 2007 +0000 - fix path for sysfont hook commit 0de7792eac7ed53b28a241a0207ceb309f46d9ea Author: Peter Jones Date: Tue Mar 6 19:10:13 2007 +0000 - get the version number right, too. commit e6ae0244dec7430619acea404a0973cbe20d09d9 Author: Peter Jones Date: Tue Mar 6 19:08:46 2007 +0000 - er, get the version number bit right ;) commit a772fdf6017e76d904555311060aae7e416274cf Author: Peter Jones Date: Tue Mar 6 19:08:05 2007 +0000 - change to use the new directory layout - bump version to 0.99.2 commit 8a16baec2900770f24b553b5309f3df9edc3ea07 Author: Peter Jones Date: Tue Mar 6 19:03:19 2007 +0000 - use "bash" not "sh" commit fd836c73a4be54b46bcdbfdf8f56487f93fbc0f5 Author: Peter Jones Date: Tue Mar 6 18:57:36 2007 +0000 - add pm-reset-swap here commit 17581d15af3e678b745dd25b99db459c351e885a Author: Peter Jones Date: Tue Mar 6 17:56:28 2007 +0000 - fix date on changelog commit 3c75df6e506e77ea4d38a7abeea1e2876c6837ef Author: Peter Jones Date: Tue Mar 6 17:56:11 2007 +0000 - use "bash" not "sh" in hook scripts commit e3d62981a58d3d105d721f7ad7ad7222c6a1673d Author: Peter Jones Date: Fri Mar 2 21:35:38 2007 +0000 - use .Rescan since davidz fixed it. commit 65c64c4341e92d856afb39b737ceb696308a89ef Author: Peter Jones Date: Thu Mar 1 18:29:14 2007 +0000 - fix shell quoting in variable tests commit 7b9a7de77ae44556f2716eaae86038c7f4fd9d23 Author: Peter Jones Date: Thu Mar 1 18:27:01 2007 +0000 - fix use of [ with =~ commit 2702adc1d394e3120a6397eda5d96a06cd9ca8d7 Author: Peter Jones Date: Thu Mar 1 17:01:53 2007 +0000 - make this work entirely in the resume/thaw path - don't use hal-device, use hal-set-property commit 91a8abb2b8057ec5bba82dfac01a5058a3000b4b Author: Peter Jones Date: Thu Mar 1 16:55:41 2007 +0000 - minor cleanups to NM hook commit 944c781fea78b86279a15281d6ec19d2fdbb0fdc Author: Peter Jones Date: Thu Mar 1 04:14:55 2007 +0000 - add battery probing hook commit 0f0c785facb7332cf0f4f4eca57d0c881cf3d97b Author: Peter Jones Date: Tue Feb 20 19:45:49 2007 +0000 - Fix man page generation. commit 04280470e4c9f742c2677152316f792b93a91c3d Author: Peter Jones Date: Tue Feb 20 18:59:25 2007 +0000 - manually fix up the crap that's getting generated... commit 6c7a86e783f39d7767e2537129494823e2de4ca9 Author: Peter Jones Date: Tue Feb 20 18:54:26 2007 +0000 - split 20video's resume/thaw components out to 99video so it'll run sooner. commit 1014e2094be149ff3086bafe5de368d3f498705d Author: Peter Jones Date: Tue Feb 20 18:21:47 2007 +0000 - bump version for prerelease commit e5767aec119b271b4e6e722315046b68225d0303 Author: Peter Jones Date: Tue Feb 20 18:19:02 2007 +0000 - add error messages commit 5ff08f96b93233502eaa4a5094e369200a9dce9f Author: Peter Jones Date: Tue Feb 20 18:14:22 2007 +0000 - handle emacs backups like we handle them in pm/functions commit 5cb482e387a076187440c7ea626147a640f31655 Author: Peter Jones Date: Tue Feb 20 18:10:44 2007 +0000 - don't squash sysfont's output commit 7cac94889552b2fbb025981e3d8d5d657f3173b8 Author: Peter Jones Date: Tue Feb 20 18:07:04 2007 +0000 - handle command line options for video quirks (patch from hughsie and pjones) commit c35499ec3ef9338485ea90f3b6715e803a093553 Author: Peter Jones Date: Tue Feb 20 16:50:12 2007 +0000 - add changelog for pm/functions change commit 7d427f7f7dec95cc07217fe393ceb8710092df00 Author: Peter Jones Date: Tue Feb 20 16:44:38 2007 +0000 - fix functions to get module unloading right with _ and - in the names commit 8c6c3eb0bc95b9781787ab12053d2b77437368ea Author: Peter Jones Date: Fri Feb 2 17:53:55 2007 +0000 - Fix setsysfont hook to actually hit tty0, not the pty of the current task. commit dd5832149649ffc7128548e83f9592468801f9f4 Author: Peter Jones Date: Tue Jan 30 16:50:27 2007 +0000 - add pm hook to save and restore alsa settings - add 60sysfont and 65alsa to Makefile.am commit 533751122ad699a8390954bd1a611560ffb30f9b Author: Peter Jones Date: Tue Jan 30 16:46:03 2007 +0000 - add a hook that sets they sysfont on resume/thaw commit caa75b6b70659dc11a027fc3ea26feb9526bb4f9 Author: Peter Jones Date: Tue Jan 30 16:42:49 2007 +0000 - add rhbz info commit 12647523744702ff051bbc6dc5fb5ec511dc92d7 Author: Peter Jones Date: Tue Jan 30 16:42:12 2007 +0000 - remove mDNSResponder stuff from the networkmanager hook. commit 71029b29f43c01a57d33fb56050aeeae69294fc5 Author: Peter Jones Date: Tue Jan 30 16:34:37 2007 +0000 - fix permission checking (patch from Phil Knirsch, rhbz #222819) commit fe79418e9ee0c15b371eb309e09ea109687c67ab Author: Peter Jones Date: Mon Jan 29 21:54:45 2007 +0000 - add changelog entry for pm-reset-swap commit 410a8b3c63b178560b8b007e66f6618754039cc0 Author: Peter Jones Date: Mon Jan 29 21:49:45 2007 +0000 - Add a utility to remove the S1SUSPEND stamp from a swap device. commit 3c086a1670d928452b009a9e1269af0ab1b956b7 Author: Peter Jones Date: Tue Jan 2 16:44:51 2007 +0000 - Set scheduler policy for different power states commit 5ea0c449249186457d3cccda5dd1eaafa71806a1 Author: Peter Jones Date: Tue Dec 5 16:35:15 2006 +0000 - Fix on_ac_power not to use batteries as an indicator commit 514521c81363a72f77d8bbeb3e03ee80d78e6609 Author: Peter Jones Date: Thu Nov 30 20:07:04 2006 +0000 - log when hooks finish - don't discard service start+stop messages commit 44a852c154905bfbdf71001e8fa1e815a6bc5a7c Author: Peter Jones Date: Thu Nov 30 20:05:46 2006 +0000 - don't stop services or remove modules during suspend, just turn off the device. (This needs some more work on non-thinkpad machines, I think...) commit ff1c00e625db258eb0537f285f382c52366e598c Author: Peter Jones Date: Wed Nov 29 22:36:45 2006 +0000 add changelog for source_configs rewrite commit d00a43fb93d027c6b2150c2bbece696039f0cd54 Author: Peter Jones Date: Wed Nov 29 22:35:47 2006 +0000 - make source_configs work right (from Stefan) commit 961d6b723b46f8f6eaae8a2aed9c4e5a6697d5e4 Author: Peter Jones Date: Tue Nov 28 23:03:12 2006 +0000 - enable 94cpufreq hook for all cases commit abc1939bbd45ca27a81cd654e111b023fdb39b4f Author: Peter Jones Date: Tue Nov 14 16:08:58 2006 +0000 - log kernel stats if PM_LOGFILE is set commit c0bf4d8827576a8cf9e3896fcf55501f848536a2 Author: Peter Jones Date: Tue Nov 14 16:01:30 2006 +0000 - Fix logging of hook names (patch from Holger Macht). commit 0d45d3bc15db2dab8d7384e6bbb4224076de2e9b Author: Peter Jones Date: Tue Nov 14 16:00:12 2006 +0000 - sort initializations of the globals - add some comments about them. commit 987744081866325a21b267e770a752eaf5589b13 Author: Peter Jones Date: Mon Nov 6 16:35:42 2006 +0000 - be more picky about sanity checks on /sys/power/state's contents and /sys/power/disk's presense. commit 33fc341c70a65ee42a8fafa9d497683748c4a42e Author: Peter Jones Date: Tue Oct 31 18:18:53 2006 +0000 - add some missing changelog entries commit f4944ebf09129e88fe08b967258ec92071191b84 Author: Peter Jones Date: Tue Oct 31 17:52:16 2006 +0000 - add INHIBIT support (seife, pjones) commit 748e8139c551ed510d4d818b2d3cf4a11c62ddd1 Author: Peter Jones Date: Tue Oct 31 15:40:51 2006 +0000 - don't initialize RESUME_MODULES commit d8568c6b842cc345a4b8d995b797b82ab495ab3c Author: Peter Jones Date: Mon Oct 30 18:43:12 2006 +0000 foo commit 26734ae6163fdf0149f0fc640366d818808c3ef3 Author: Peter Jones Date: Mon Oct 30 18:28:17 2006 +0000 foo commit 844f38b43d835e9c14fd29900eb31cfa2bc56792 Author: Peter Jones Date: Mon Oct 30 18:17:03 2006 +0000 - I'm just testing my mail filter rules. commit 66eeeb65f29003ae2f6c0d0470aaea884232268a Author: Peter Jones Date: Mon Oct 30 15:40:42 2006 +0000 - rename LOGFILE to PM_LOGFILE - use exec to redirect our stdin/stdout to the log - inherit PM_LOGFILE from the environment if it's set there. commit f1697c420ad54a9ba5f09d8aa35c191452887f8d Author: Peter Jones Date: Sat Oct 21 19:47:02 2006 +0000 - use modprobe -r, not rmmod commit 703a54dd5fc315791e85e78f72582867fe677dc4 Author: Peter Jones Date: Sat Oct 21 19:43:40 2006 +0000 - module load/unload fixes from Stefan. commit 786fc6815f6e078113f2cc3d15612a10016de79b Author: Peter Jones Date: Sat Oct 21 19:18:19 2006 +0000 - Merge logging infrastructure from Stefan Seyfried commit 908f33c1261f87b371bd6ef30d1e217709d5a30a Author: Peter Jones Date: Wed Oct 11 22:49:27 2006 +0000 - fix missing decrement in reverse-hooks loop. commit 8d07110eeb2e0a604087f4123f7c3e55ed2934c6 Author: Peter Jones Date: Tue Oct 10 16:14:50 2006 +0000 - don't source /etc/rc.d/init.d/functions, we don't need it - set sane script-wide path - use "read" instead of "cat" to read /.suspended - use globbing to exclude emacs's litter - use shell not awk to do the hook reversal - don't specify full paths for programs in PATH commit b6f6896d86eb10935571bc65d398094f9590b33e Author: Peter Jones Date: Thu Sep 28 21:25:36 2006 +0000 - ignore emacs backup files in config dirs commit 48b9b9adcafbc071566cda9581b39c3c2b82b3b8 Author: Peter Jones Date: Wed Jun 14 16:05:20 2006 +0000 - don't show an error message on platforms without /dev/pmu, just exit 1 commit f594add7b1c23c7e56c80ce2b28c45ff972bbc97 Author: Peter Jones Date: Wed Jun 14 15:15:39 2006 +0000 - add changelog entries for the stuff I committed this morning commit 897c063fef9ba66f99bd05ca37e9bca5acef958f Author: Peter Jones Date: Wed Jun 14 04:08:03 2006 +0000 - fix DESTDIR usage - don't clobber install-exec-am; use install-exec-hook instead - put on_ac_power in bindir not sbindir commit fb0a58572cef7100dbb0f5757f570d0fe7928fc7 Author: Peter Jones Date: Wed Jun 14 04:07:21 2006 +0000 - fix DESTDIR usage - don't clobber install-exec-am; use install-exec-local instead commit c6f6d591dcd927dacd59128812d75c2f61f6e484 Author: Peter Jones Date: Wed Jun 14 03:18:47 2006 +0000 - fix broken script directory commit f32e7bcb5cc2c8d78a797c417492d8b0e1269439 Author: Peter Jones Date: Tue Jun 13 21:11:03 2006 +0000 - add hook to make sure cpufreq is set to userspace control during hibernate, or else we get nasty deadlock issues. (this can be reverted/disabled when the kernel gets fixed) commit 948f5275074d4741f40a19afae92496bea61897b Author: Peter Jones Date: Mon Jun 12 17:12:40 2006 +0000 - don't allow non-root to run things commit 31894fcfa2d621927b362d94564df6271562a398 Author: Richard Hughes Date: Mon Jun 5 22:16:33 2006 +0000 2006-06-05 Richard Hughes * src/Makefile.am: symlink pm-suspend and pm-hibernate to pm-action commit e7d0b3a948cacdddd89a22a101004bc13a5f8e62 Author: Richard Hughes Date: Mon Jun 5 22:03:20 2006 +0000 2006-06-05 Richard Hughes * configure.in: * pm/Makefile.am: Create /etc/pm/config.d on package install as this is an empty directory for custom configs. * src/Makefile.am: Build the src, and install the scripts. TODO: symlink the pm-* scripts. commit be6bc9d7464bb9897acec10fdf7580aa3d212326 Author: Richard Hughes Date: Mon Jun 5 21:47:28 2006 +0000 2006-06-05 Richard Hughes * INSTALL: Add this GNU required file. * man/on_ac_power.1: * man/pm-pmu.1: Newest files (from the SGML files) * .cvsignore: * man/.cvsignore: * pm/.cvsignore: * pm/Makefile.am: * pm/hooks/.cvsignore: * pm/power.d/.cvsignore: * src/.cvsignore: Add these files to keep cvs happy. commit 7306ce4d2ae22de302034f2d6c69aaf1b8cea9cd Author: Richard Hughes Date: Mon Jun 5 21:26:02 2006 +0000 2006-06-05 Richard Hughes * Makefile: Remove old build system, as Makefile is now autogenerated. * Makefile.am: * configure.in: Add in master build files for the autotooled build system. commit f0e3d83cf652c34adc34fd83e6c7c347f463c27c Author: Richard Hughes Date: Mon Jun 5 21:09:24 2006 +0000 2006-06-05 Richard Hughes * man/Makefile.am: Connect up the sgml->.1 conversion to the autotools build system. commit 96647f5aff3eb9cebcafb4148825f69108f49423 Author: Richard Hughes Date: Mon Jun 5 20:55:08 2006 +0000 2006-06-05 Richard Hughes * MAINTAINERS: Add pjones as maintainer. * autogen.sh: * pm/Makefile.am: * pm/hooks/Makefile.am: * pm/power.d/Makefile.am: Start to add autotools build system. commit f120e807617807d4a04fbdb186d9a89677317a13 Author: Richard Hughes Date: Mon Jun 5 20:49:48 2006 +0000 2006-06-05 Richard Hughes * man/on_ac_power.sgml: * man/pm-pmu.sgml: Don't use hardcoded .1 files, instead generate them using sgml files. commit e32beb674d911c0c0bf8195bde9e29e0fbb1141d Author: Richard Hughes Date: Mon Jun 5 20:37:49 2006 +0000 2006-06-05 Richard Hughes * NEWS: Add this file for release news. Required for autofoo. commit ee3f9a545acbdd51b059c1f1a7d35e8a67e933fe Author: Richard Hughes Date: Wed May 17 19:08:38 2006 +0000 2006-05-17 Richard Hughes * .cvsignore: Add this file to keep CVS happy. * pm/power.d/laptop-tools: * Makefile.am: Add this folder and file to make the low power actions easy to add. * pm-powersave: Do not just do hardcoded actions, instead run the scripts in /etc/pm/power.d/ with true and false arguments. commit abea65d43fd0945a6f14bd0a979f5c57837d9289 Author: Peter Jones Date: Tue May 16 15:15:05 2006 +0000 - make sure we do VT_SWITCH once _before_ switching back to X, so that the screen is in a sane mode when X gets it. commit 97a5d3155a042bcc55825eef178a4202fc604e7e Author: Peter Jones Date: Tue May 2 20:47:59 2006 +0000 - add a hack to compensate for broken system headers. commit 15dca265544fb9dc5215cb4ef0a9d29b530c367e Author: Peter Jones Date: Tue May 2 18:19:14 2006 +0000 - add pm-pmu, at least for now commit 759a83ad40f915c74d89f3f153281c998233d8be Author: Peter Jones Date: Tue May 2 18:13:48 2006 +0000 - add copyright and license notices commit 0af91bce436b75b38186c2504ee5a8a520d5eed5 Author: Peter Jones Date: Mon May 1 19:51:29 2006 +0000 - handle an empty config.d correctly. commit 7a0b8ee55e9ba57ab2f7e2b60523bc31b6784f79 Author: Peter Jones Date: Mon May 1 15:20:59 2006 +0000 actually make this work commit 3a6757b9f1e613fc5471083e2eeb9bc1beec8165 Author: Peter Jones Date: Mon May 1 14:56:12 2006 +0000 - use override to set it commit 16528b4c40ee7f63908d0f3c6cb499a3030280a1 Author: Peter Jones Date: Mon May 1 14:48:24 2006 +0000 - add "make test-archive" commit b81999fa786b3f3ffd93c7d297b4cae4d5e5728c Author: Peter Jones Date: Mon May 1 14:36:43 2006 +0000 - changelog for on_ac_power removal change. commit e3e833f459cdc28c359e5d468dd67d9786fd644e Author: Peter Jones Date: Mon May 1 14:36:01 2006 +0000 - don't kill on_ac_power in "make clean" commit 7fec605fdf356d4a3d76fb7b6815dd674bece9ae Author: Peter Jones Date: Mon May 1 14:34:17 2006 +0000 - bumping the number for some CVS testing commit 20cb6a468665a0e7fd83ffef179f7283e283be09 Author: Peter Jones Date: Fri Apr 28 17:34:05 2006 +0000 - change on_ac_power to be a shell script commit d0390318d1ca6c9cb7420018d9ff23771896ee6a Author: Peter Jones Date: Fri Apr 28 15:56:07 2006 +0000 - revert bogus change WRT led behavior commit 93de24fe63ac36718084664c54f65720e29835ec Author: Richard Hughes Date: Fri Apr 28 15:34:40 2006 +0000 2006-04-28 Richard Hughes * pm/functions-ati: * pm/functions-intel: * pm/functions-nvidia: Remove these files as we've now agreed that this belongs in HAL, and a HAL patch is close to being accepted. commit a12e9be4433fd765827aa4cd374e1427da250b7a Author: Richard Hughes Date: Fri Apr 28 15:26:19 2006 +0000 2006-04-28 Richard Hughes * pm/hooks/05led: Remove this file as we want the led to turn on at the *end* of the hooks stuff. We shouldn't have this and 95led. * pm/hooks/95led: rename to 95ibm_led as this is ibm specific. Make sure the led blinks at suspend, and turns off when we resume. commit fa1915e5893514b98897ee569937bc0ee3aff67c Author: Peter Jones Date: Thu Apr 27 23:42:49 2006 +0000 - update changelog commit 2254418346e5ca65999ca2d95e6ed2a5ab9ea291 Author: Peter Jones Date: Thu Apr 27 23:41:52 2006 +0000 - get rid of *.{pam,app}, as they're not very cross-distro commit c5d67c483483953bf64f5280f92db755537c688e Author: Peter Jones Date: Thu Apr 27 19:21:09 2006 +0000 - changelogs! commit 96c1808b64c5c954db4e0a53020bbd14540474d2 Author: Peter Jones Date: Thu Apr 27 19:10:53 2006 +0000 - don't stop/start services unless the initscript is executable - use /etc/init.d/$name instead of "service". commit 0e054672fc64cbb30d00967a81daae42386889ec Author: Peter Jones Date: Thu Apr 27 19:08:04 2006 +0000 - set LC_COLLATE commit f4d24f06dd905563f628b11155c8244f8639e328 Author: Peter Jones Date: Thu Apr 27 18:52:47 2006 +0000 - allow for /etc/pm/config.d/ commit 3a3d1ba965163a5ede3329973e458a09e105a155 Author: Richard Hughes Date: Thu Apr 27 08:05:43 2006 +0000 2006-04-27 Richard Hughes * pm/functions: Remove the video handling logic, as it is moving to HAL. * pm/functions-ati: * pm/functions-intel: * pm/functions-nvidia: Add a comment saying that the files are unused. When HAL video stuff is completed, they can be removed. * pm/hooks/20video: Switch to using the HAL methods as discussed. commit f541984ba988aae495aac2044e56bdb400410bd2 Author: Richard Hughes Date: Wed Apr 26 22:00:21 2006 +0000 2006-04-26 Richard Hughes * Add README * Add AUTHORS commit 8e2395b91c02b0c028d7dd0cadbdfbce9c85faac Author: Peter Jones Date: Wed Apr 26 17:21:28 2006 +0000 - add changelog and license stuff commit 986eec6b464fae96773c412d957a10a788018639 Author: Peter Jones Date: Tue Apr 25 22:08:17 2006 +0000 revert last change commit f95ca22913e39ed0878f82008ca3e6e91e398241 Author: Peter Jones Date: Tue Apr 25 22:06:55 2006 +0000 - boring whitespace change to make sure email notifications work commit ce7a8d8524ffdbae1aa0fb44506d07320f5c59a5 Author: Peter Jones Date: Tue Apr 25 14:27:07 2006 +0000 - bump version for last release before moving it once again :/ commit ce69a33aace4d0df24ca936e371f4814844e45d4 Author: Peter Jones Date: Tue Apr 25 14:19:57 2006 +0000 - use /etc/pm/config instead of /etc/sysconfig/pm , so this is completely cross-distro clean. commit 16721a4c0359b725deb67ecbbd2b1c5ccaf809bc Author: Peter Jones Date: Tue Apr 18 21:49:08 2006 +0000 - test cvs repo commit 91220474e915502dd51467f53f8d0230e83ba8d2 Author: Peter Jones Date: Tue Apr 18 04:42:22 2006 +0000 - get rid of some debug code commit 7a8a81a39754d53ec5889400cc451ab8c36fdc2e Author: Peter Jones Date: Tue Apr 18 04:38:46 2006 +0000 - minor cleanups commit b4cdd38f75690b574ee26852b65ad9c46e61ac2d Author: Peter Jones Date: Tue Apr 18 04:32:02 2006 +0000 - nobody knows who "vbetool dpms on" actually works for, so let's not do it... commit 0a399185568c5b0e6e0520d8e81ff5909e564f62 Author: Peter Jones Date: Tue Apr 18 01:35:20 2006 +0000 - fix syntax error commit 823a876e4caf60f83dca3a3fff354b24eb368085 Author: Peter Jones Date: Tue Apr 18 01:10:33 2006 +0000 - bump the version commit 1f41c6f50cd199a04938dc214fe6d32753eecee5 Author: Peter Jones Date: Tue Apr 18 00:54:42 2006 +0000 - don't fork a subshell to run vbetool commit 7afb9aba391be33b477d9c15b73f3613900dc794 Author: Peter Jones Date: Tue Apr 18 00:54:27 2006 +0000 - don't fork a subshell for vbetool runs commit 0af8ebabb85bf97ef9a748d59a824e53dda52653 Author: Peter Jones Date: Tue Apr 18 00:41:05 2006 +0000 - work around the fact that hci_usb and some bluetooth stuff don't do suspend right commit 011db0ab696f5c83720eb199a07f4c6508379b58 Author: Peter Jones Date: Mon Apr 17 21:27:01 2006 +0000 - merge comments from roland on error handling here commit b5baa6c299d789ae4fb12ea2d5d93020760c71d7 Author: Peter Jones Date: Mon Apr 17 21:10:53 2006 +0000 - um, don't send output to /dev/null when we want it in a file. commit 9a4e5230df28d38a75641d6e5cd5f218c1bf75a0 Author: Peter Jones Date: Mon Apr 17 19:07:40 2006 +0000 - use infrastructure for ntpd's suspend/resume commit a0b6718e005ec8158a603e6fd59e977abccdfc89 Author: Peter Jones Date: Mon Apr 17 19:02:32 2006 +0000 - should be "restartservice" not "startservice" commit 213d7f81ff0c46c97de9a01773549945e6d7d6e9 Author: Peter Jones Date: Mon Apr 17 19:00:07 2006 +0000 - use infrastructure for module unload/reload so we don't reload modules that weren't ever loaded commit 7a3f830b82ce3a9ff924da5c45b51471a8f3b98f Author: Peter Jones Date: Mon Apr 17 18:58:33 2006 +0000 - use infrastructure to start/stop mDNSResponder commit 364d18b96390bcfc4b1abdffd5e237640068ba20 Author: Peter Jones Date: Mon Apr 17 18:56:52 2006 +0000 - minor reformat commit 8a02b370998e60d3272fb418a84b5377f4c0b1d3 Author: Peter Jones Date: Mon Apr 17 18:55:02 2006 +0000 - fix typo in take_suspend_lock that causes it to be useless (sigh) - add functions for scripts to save state between suspend/resume commit 7c26ec387e4e040178dd9366a7e7476abe0bf4a7 Author: Peter Jones Date: Mon Apr 17 18:46:48 2006 +0000 - don't load /etc/pm/functions since we don't use it - use "modprobe -r" not "rmmod" commit 89460b77a448bc5de1e03ffa64a8285fee6f277a Author: Peter Jones Date: Mon Apr 17 18:45:25 2006 +0000 - don't load /etc/pm/functions since it's not used commit 8b00dd93e8f5afc53042815a28eb2f5114ad06fb Author: Peter Jones Date: Mon Apr 17 18:43:16 2006 +0000 - rework loading of /etc/sysconfig/pm so hooks don't need to load /etc/pm/functions unless they actually need code from it - remove spurious subshell-parens commit d82f30c9c5047c161a70f611125ccca1e5612643 Author: Peter Jones Date: Fri Mar 17 05:15:41 2006 +0000 - bump version commit 1ecbe91885e4a1f5665888cfe6b9946a7134b2ae Author: Peter Jones Date: Tue Mar 14 16:12:15 2006 +0000 - get the resume hooks right commit 66cb171a7ffd41388cc568e43a44ecd7264bba1a Author: Peter Jones Date: Tue Mar 14 14:56:26 2006 +0000 - move near-identical pm-suspend and pm-resume logic to pm/functions - make pm-suspend and pm-resume generic, using pm-action - add "hibernate" and "thaw" actions to scripts - get rid of kludgy PM_MODE - add pm/hooks/00clear, which clears the screen on tty63 before doing all this stuff - move pm-hibernate's default_resume_kernel into 01grub, which only does anything on "hibernate" - make 20video not do anything on hibernate either, not just thaw commit 976d0852cce44d9f0a3cde3e0d51e0ee0f3b5ac9 Author: Peter Jones Date: Sat Mar 11 18:37:37 2006 +0000 - bump version commit 40e1b74063b72090e9546027427da659c3a97f9a Author: Peter Jones Date: Sat Mar 11 18:35:05 2006 +0000 - make this much more readable so we don't keep screwing it up. commit 938c8309e9bfb8c10c590079e55b402d2e84aeb2 Author: Peter Jones Date: Fri Mar 10 22:42:04 2006 +0000 - update to 0.14-1 commit 725b22277be84bb6cb72743c33b447dcb1561140 Author: Peter Jones Date: Fri Mar 10 22:34:06 2006 +0000 - fix hibernate check - fix hibernate resume choice check (-a instead of -o) - I am a dumbass and jeremy sucks at code review. commit 0f66d6c332216bf98a518c47a07c98ad7866beb3 Author: Phil Knirsch Date: Fri Mar 3 13:27:34 2006 +0000 - Revert the last few changes as it seems to cause more problems than it fixes for ATI chipsets. commit f23f61f682ae26eb3a8985f1a688869c4231b5b5 Author: Phil Knirsch Date: Wed Mar 1 15:23:42 2006 +0000 - Updated version in makefile commit 87a55ac0a2aa2fe2403397a7c656ba8ee3ebaeb2 Author: Phil Knirsch Date: Wed Mar 1 15:22:38 2006 +0000 - Use vbetool post instead of vbetool dpms on for ATI cards. commit 6171b6ca2802c46d0eeba18b9e6a366a77e23c50 Author: Peter Jones Date: Tue Feb 28 17:04:19 2006 +0000 - don't post video by default on resume from hibernate commit 3b7440695996c6c96dccd0708f1328dd606a0fe1 Author: Jeremy Katz Date: Tue Feb 28 16:51:20 2006 +0000 fix nvidia resume to actually have the display on. tested on toshiba tecra m3 at my desk commit a748ded06075250f343553f7cde50843d00bc0f6 Author: Phil Knirsch Date: Fri Feb 24 12:29:29 2006 +0000 - Added missing pciutils-devel BuildRequires (#182566) - Fixed missing vbestata save/restore calls for video suspend/resume (#182167, #169494) - Renamed hook scripts to allow local pre and post inserts (#179421) - Added support for blinking led lights on Thinkpad Laptops during suspend (#179420) - Added pm-powersave script for powersaving via HAL (#169054) - Added symlinks for pm-shutdown and pm-restart (#165953) commit 3758340f1b05ff9ffadff01f85c6e915c1c6b2d9 Author: Jeremy Katz Date: Thu Feb 23 23:28:13 2006 +0000 call grub with --no-floppy on hibernate commit 88b8b2ff8a9695a92486abc5eee9911cff7e0442 Author: Jeremy Katz Date: Wed Jan 25 01:02:40 2006 +0000 * make pm-hibernate set the default kernel to boot to the one we're running so that resuming works * rmmod button before suspend per davej commit b8a03b4aa5881355184c8072c4a777de3591efbe Author: Peter Jones Date: Thu Dec 22 19:52:06 2005 +0000 update version commit c467e1cdd05409a54e73df0e58860a2b7ce39f5d Author: Peter Jones Date: Thu Dec 22 19:51:37 2005 +0000 fix for new pciutils that changed the output format randomly. commit c1488e1547b277f37de348b5d810e57f5caa3fed Author: Peter Jones Date: Thu Dec 1 00:39:54 2005 +0000 - bump version to 0.7 commit d8c99913c2ae012f97a91c690bb9719060f09bbc Author: Peter Jones Date: Thu Dec 1 00:39:16 2005 +0000 - restart ntp in the background (after some delay) since the network isn't back up yet, and it'll try to resync before backgrounding itself. commit f6c37c8902ff9043e8865426f63cb47ebe1b9763 Author: Peter Jones Date: Thu Dec 1 00:38:13 2005 +0000 - change to vt63 before we actually suspend, so that the videomode switch doesn't wake Jeremy's video back up. commit 6803cc0b92e92d49e81d9e8ec17fb861dd58dd54 Author: Peter Jones Date: Thu Nov 10 20:23:59 2005 +0000 . bump version commit bf61d0d9a174b2ccecacb1fb1ade881362bf9973 Author: Peter Jones Date: Thu Nov 10 20:20:48 2005 +0000 . remove calls to acpi_video_cmd; the function isn't there anyway, and if people want it they can use hooks. . fix typo in call to radeontool commit 274aceb03e8da09566215718e1cc949f45a4ede9 Author: Bill Nottingham Date: Fri Sep 30 16:03:02 2005 +0000 check for presence of various tools/files before using them (#169560, #196562) commit 4922087d2ba94b5c942bf941b7eaafc2e1f1e78e Author: Jeremy Katz Date: Fri Aug 12 22:03:33 2005 +0000 add pm-hibernate stuff commit 1f71777dc9ec5369530de54faec5ec55f4e80a70 Author: Bill Nottingham Date: Tue Jul 5 14:09:56 2005 +0000 fix path to video functions commit a6b53f6ef9a7c30c746a53084e747f1d57d9b605 Author: Bill Nottingham Date: Tue Jul 5 05:29:03 2005 +0000 silence! commit 062452fa99a589248ec52a71b66ad2f31d69f767 Author: Bill Nottingham Date: Tue Jul 5 05:27:19 2005 +0000 you know, it helps if you include all the files commit 91f949dd06cafe2eb0277f963543ced5ccc556ec Author: Bill Nottingham Date: Tue Jul 5 05:23:41 2005 +0000 duh commit 6d1b55109652fdb39d56962224188963ff588eff Author: Bill Nottingham Date: Tue Jul 5 05:20:19 2005 +0000 yet more build fixes commit ef785aee7b20d88976a91720e68b3c4cc958cf56 Author: Bill Nottingham Date: Tue Jul 5 05:19:13 2005 +0000 make it build commit e945511621a079b5fe2654491cdb610f739c57b4 Author: Bill Nottingham Date: Tue Jul 5 05:14:18 2005 +0000 whoops commit 9e81319ce7a4782b1d1b219553eaf839634d8e52 Author: Bill Nottingham Date: Tue Jul 5 05:12:08 2005 +0000 check in some stuff pm-utils-1.4.1/INSTALL0000644000175000017500000002243211414116753011247 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. pm-utils-1.4.1/NEWS0000644000175000017500000001061311414117645010714 00000000000000Major changes since the 1.3 series: * The pm-utils git tree includes infrastructure to build .deb packages, .rpm packages. and Arch Linux .tar packages. These are not intended to replace distro packaging, and are not included in the release tarballs. * We include some basic power management hooks. The individual hooks can conflict with the ones provided by the laptop-mode-tools scripts, so you should either just remove laptop-mode-tools entirely or pick and choose between which package should handle what powersaving functionality. Major changes since the 1.2 series: * We no longer rely on HAL at all for video quirks. * The pm-utils project has taken over maintenance of the video quirk database. Most systems coming out no longer rely on quirks, due to KMS enabled drivers for most common chipsets along with the two major binary video drivers handling any needed suspend/resume handling themselves. Major changes since the 1.1 series: * Our pkg-config support now includes variables that directly map to where the various hooks should be installed. This should make it easier for other packages to install hooks in a portable fashion. * 90clock no longer runs by default. It added over a second to suspend, and the vast majority of hardware does not need it to keep the clocks in sync. If a user needs this hook, they can set the NEED_CLOCK_SYNC environment variable. If pm-utils@lists.freedesktop.org does not get any reports of systems that require this hook to keep their clocks synced, it will be removed in a future release. * 50ntpd has been removed. It was very ad-hoc to begin with, and there has never been a guarantee that restarting ntpd would force it to resync the clocks, or that the system would even find a network after coming out of suspend. The ntpd daemon itself is robust in the face of interfaces going away and reappearing, so there is no reason to restart it on account of the network interfaces changing -- ntpd will keep the clock updated over any available interface according to its own schedule. If you just want to update the time whenever the network comes back without running ntpd continually, utilize NetworkManager dispatch scripts (or your network infrastructure equivalent) to do so whenever the Internet comes up. * 65alsa has been removed. According to the ALSA dev team, all drivers that have power management support will save and restore their state correctly across a suspend or hibernate, and drivers that don't have power management support need to have their state saved, then unloaded before suspend, reloaded on wakeup, and then have their state restored. The best way to take care of this would be to use the standard pm-utils mechanisms for loading and unloading modules, and then arrange for modprobe and/or udev to save and restore alsa state when unloading or loading alsa modules. * 55battery has been removed. This hook was in place to work around a HAL issue with rescanning battery status on resume, but HAL implemented a fix for this issue in 2006. * We always set the acpi video flags to the values indicated by HAL. If HAL does not indicate that a specific set of acpi video flags are needed, we always set it to 0. As a consequence, the acpi video flags passed to the kernel at boot time are ignored. If you rely on this functionality and HAL does not have the appropriate quirks for your system, we strongly recommend that you create a .fdi file that has the appropriate quirks for your system by passing the appropriate quirks to pm-suspend along with the --save-quirks-as-fdi parameter. This will create a .fdi file that you can then use locally (after restarting HAL) and submit for inclusion to hal-info so that other users with your hardware config can benifit from your actions. * Sleep backends are now stackable, and pm-utils will always fall back to kernel methods if nothing else will work on any given system. See pm/HOWTO.modules for more information. * pm-utils now knows how to get the quirks from HAL, and includes functionality to save user-passed quirks in a .fdi file. This makes it easier for users to generate and share quirks, and it makes debugging suspend/resume problems easier. * We now have a recommended hook ordering convention. See pm/HOWTO.hooks for more information. All pm-utils supplied hooks have been renamed to conform to this hook ordering. pm-utils-1.4.1/TODO0000644000175000017500000000201111414117645010676 00000000000000* There are no provisions for configuring the tuxonice backend. Tuxonice has lots of things that can be tuned, but doing so would end up duplicating alot of the tuxonice project's hibernate script. We should talk to their maintainers about merging common functionality. * If a hook needs to handle parameters passed from the command line, it has to do that on its own. A simple parameter-parsing engine might come in handy. * pm-utils to become the default low-level userspace power management handling infrastructure for the majority of Linux (and mabye other unixalikes) distributions. The core pm-utils infrastructure is already fairly distro-agnostic, leveraging it to be os-agnostic should also be possible. We should get it to the point that any program that needs something to happen when running a power management task uses our functionality instead of rewriting their own. * The man pages should be improved to document new configuration variables, contain examples how to write hooks etc. pm-utils-1.4.1/depcomp0000755000175000017500000004426711414120262011573 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pm-utils-1.4.1/install-sh0000755000175000017500000003253711414120262012217 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pm-utils-1.4.1/missing0000755000175000017500000002623311414120262011606 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: pm-utils-1.4.1/pm/0000755000175000017500000000000011414120570010677 500000000000000pm-utils-1.4.1/pm/HOWTO.hooks0000644000175000017500000001267011414116760012600 00000000000000How to write a pm-utils hook: PARAMETERS A pm-utils hook is simply an executable file that accepts at least one parameter. For hooks in sleep.d, the potential values of the first parameter are: suspend -- The hook MUST perform whatever action is appropriate when the system is preparing for memory sleep (or its equivalent). resume -- The hook MUST perform whatever action is appropriate when the system is coming out of suspend. hibernate -- The hook MUST perform whatever action is appropriate when the system is preparing for suspend-to-disk. thaw -- The hook MUST perform whatever action is appropriate when the system is coming out of suspend-to-disk. help -- If your hook parses the PM_CMDLINE environment variable for switches, this function SHOULD output text describing the parameters it parses in a format easily understandable by an end-user. The actual sleep method being used will be passed as the second parameter -- if your hook needs to handle suspend-hybrid (or any other platform-specific sleep method), it should examine the second parameter. For hooks in power.d, the potential values of that parameter are: true -- the hook MUST perform whatever action is appropriate when the system transitions TO battery power. false -- The hook MUST perform whatever action is appropriate when the system transitions FROM battery power. NAMING SCHEME All hooks are run in lexical sort order according to the C locale. HOOK EXIT CODES In normal operation, hooks should only return either 0 or 254 as exit codes. 0 indicates that the hook performed its task normally. 254 indicates that the hook is not applicable to this system. Any other return code is interpreted by the pm-utils machinery as a signal from the hook that it should abort whatever it is doing. When running sleep.d hooks, that means that pm-utils stops running hooks, aborts the suspend/resume process, calls any hooks that ran successfully prior to this one with the appropriate wakeup options, and exits with a non-zero exit code. When running power.d hooks, any hooks after this one will be skipped. SLEEP.D SPECIFIC NOTES For any given sleep/wakeup cycle, the hooks in sleep.d are run twice: * Once in C lexical sort order before the system goes to sleep, and * Once in reverse C lexical sort order when the system wakes up. SLEEP HOOK ORDERING CONVENTION 00 - 49: user and (most) package supplied hooks. If your hook assumes that all of the usual services and userspace infrastructure is still running, it should be here. 50 - 74: service-handling hooks. If you need to stop or start a service, you should have a hook in this range. 75 - 89: module and non-core hardware handling. If you need to load/unload a module, or mess with some non-video related hardware that would otherwise break suspend or hibernate, the hook that does that should be in this range. 90 - 99: reserved for critical suspend hooks. The hooks in this range should not be messed with unless you know what you are doing. They start with 90chvt and end with 99video At or before 50, you can assume that all services are still enabled. At or before 75, you can assume that all modules are still loaded. SUSPEND FAST PATH When suspending the system to memory, most of the time is used to synchronize the disks and perform the actual sleep process in kernel space. On modern systems, these steps generally only take 1 - 3 seconds. Since just about every laptop user wants their system to sleep and wake up as fast as possible, you should minimize the amount of work done during suspend and during resume before we switch vts back to the original vt. If you have something to do that will take lots of time, try to run it during resume after the 90chvt hook runs -- that will minimize the impact we have on resume time. CONVENIENCE FUNCTIONS If your hook is a shell script that supports POSIX/SuS compatible syntax, you MAY source "${PM_FUNCTIONS}". The variable will be set in the environment of the hook. This will make the following convenience functions available: 1: try_lock try_lock expects a single parameter -- the name of the lock to try to acquire. Exit code denotes success. 2: spin_lock Wrapper around try_lock. Second parameter is the number of seconds to wait for the lock before giving up. If no second parameter is passed, this function will wait for 60 seconds. 3: release_lock Release a previously acquired lock. First parameter is the name of the lock. 4: get_power_status Outputs our power source on stdout. 5: modunload Unload a module. Exit code denotes success. 6: modreload Reload all the modules unloaded by modunload. 7: stopservice Stop a service. First parameter is the name of the service to stop. 8: restartservice Restart a service. Service must have been stopped by stopservice. 9: savestate Save state piped into this function on stdin. First parameter is the name of the state being saved. If a second parameter is passed, this function will use it instead of stdin. 10: restorestate Outputs state saved by savestate on stdout. The first parameter is the name of the state to restore. 11: disablehook Prevent a hook from running. The exact name of the hook (including numberic prefix) must be passed. 12: inhibit Inhibit the suspend/hibernate process. pm-utils will not try to hibernate the system after this function is called. 13: inhibited Test to see if inhibit has been called. 14: dbus_send Just like regular dbus-send, but return $NA if the command fails for any reason. pm-utils-1.4.1/pm/HOWTO.modules0000644000175000017500000000422211414116753013121 00000000000000How to write a sleep module: OVERVIEW: Sleep modules are POSIX-compatible shell scripts designed to be sourced by the pm-utils machinery in order to check that the machine supports a sleep method and to actually enter that method. Sleep modules can be stacked, which means that some care must be taken to write a sleep module. The basic rules are as follows: 1: Check to see if someone else has already implemented your sleep method. If they have, you should do nothing. 2: Check to see if your sleep method is applicable to this system. If it is not, you should do nothing. 3: If no other module has claimed your sleep method and this system is capable of performing your sleep method, then go ahead and define the function that implements your sleep method. As an example of how to do things, take a look at pm/module.d/uswsusp, which implements all three sleep methods and shows how to use the module helper functions add_before_hooks and add_module_help. Currently, three sleep methods are supported: SUSPEND: Suspend (also known as suspend-to-ram) is the sleep mode equivalent to ACPI S3 -- state is saved in system memory, and all other hardware is either powered off or in power-saving mode. Your sleep module must implement do_suspend if you support suspend to ram. HIBERNATE: Hibernate (also know as suspend-to-disk) is the sleep mode equivalent to ACPI S4 -- the system state is saved to permanent media (like a hard drive), and the system is either in a very low-power use mode or completly powered off. Your sleep module must implement do_hibernate if you support suspend to disk. SUSPEND_HYBRID: suspend_hybrid is a blend of suspend and hibernate. It performs all the tasks needed to put the system into hibernate mode (including writing the memory image to disk), and then puts the system into suspend mode. If implemented porperly, this should provide the convienence of the resume speed of suspend with the assurance that your state is saved to the hard drive if you run out of power. If your sleep module supports suspend_hybrid, it MUST define 2 functions: Your sleep module must implement do_suspend_hybrid if you support hybrid suspend. pm-utils-1.4.1/pm/defaults0000644000175000017500000000374311414116753012370 00000000000000########################################################## # DO NOT EDIT THIS FILE! # # # # Add files in /etc/pm/config.d/ instead! # ########################################################## # Default method to power down the system when hibernating. # If commented out, the system will use the kernel default as a # default value. # # Check /sys/power/disk for valid values. The default value # will be surrounded by [square brackets]. # HIBERNATE_MODE="shutdown" # Whether we need to post the video card when resuming from # hibernate. You should not normally need to set this. # In the future pm-utils will get this setting from HAL. # # Valid values are "no" and "yes" # HIBERNATE_RESUME_POST_VIDEO="no" # The default sleep/wake system to use. Valid values are: # kernel The built-in kernel suspend/resume support. # Use this if nothing else is supported on your system. # uswsusp If your system has support for the userspace # suspend programs (s2ram/s2disk/s2both), then use this. # tuxonice If your system has support for tuxonice, use this. # # The system defaults to "kernel" if this is commented out. # SLEEP_MODULE="kernel" # These variables will be handled specially when we load files in # /etc/pm/config.d. # Multiple declarations of these environment variables will result in # their contents being concatenated instead of being overwritten. # If you need to unload any modules to suspend/resume, add them here. # SUSPEND_MODULES="" # If you want to keep hooks from running, add their names here. # HOOK_BLACKLIST="" # If you want to unconditionally add parameters to the commandline, # add them here. # ADD_PARAMETERS="" # If you want to ignore commandline parameters, add them here. # DROP_PARAMETERS="" # If you need to synchronize the system clock across a suspend/resume or # hibernate/thaw cycle, set this variable. # NEED_CLOCK_SYNC="true" pm-utils-1.4.1/pm/Makefile.am0000644000175000017500000000115411414116753012664 00000000000000SUBDIRS = \ sleep.d \ power.d \ module.d pm_libdir = $(libdir)/pm-utils pm_sysconfdir = $(sysconfdir)/pm pm_lib_SCRIPTS = functions pm-functions dist_pm_lib_DATA = defaults dist_doc_DATA = HOWTO.hooks \ HOWTO.modules script_in_files = functions.in pm-functions.in CLEANFILES = $(script_in_files:.in=) EXTRA_DIST = $(script_in_files) install-exec-local: -mkdir $(DESTDIR)$(sysconfdir)/pm/config.d do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_libdir),g' \ -e 's,[@]PM-UTILS-SYSCONFDIR[@],$(pm_sysconfdir),g' SUFFIXES = .in .in: $(do_subst) $< >$@ chmod +x $@ clean-local : rm -f *~ pm-utils-1.4.1/pm/Makefile.in0000644000175000017500000005132011414120262012663 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pm DIST_COMMON = $(dist_doc_DATA) $(dist_pm_lib_DATA) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pm_libdir)" "$(DESTDIR)$(docdir)" \ "$(DESTDIR)$(pm_libdir)" SCRIPTS = $(pm_lib_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive DATA = $(dist_doc_DATA) $(dist_pm_lib_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = \ sleep.d \ power.d \ module.d pm_libdir = $(libdir)/pm-utils pm_sysconfdir = $(sysconfdir)/pm pm_lib_SCRIPTS = functions pm-functions dist_pm_lib_DATA = defaults dist_doc_DATA = HOWTO.hooks \ HOWTO.modules script_in_files = functions.in pm-functions.in CLEANFILES = $(script_in_files:.in=) EXTRA_DIST = $(script_in_files) do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_libdir),g' \ -e 's,[@]PM-UTILS-SYSCONFDIR[@],$(pm_sysconfdir),g' SUFFIXES = .in all: all-recursive .SUFFIXES: .SUFFIXES: .in $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pm_libSCRIPTS: $(pm_lib_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(pm_libdir)" || $(MKDIR_P) "$(DESTDIR)$(pm_libdir)" @list='$(pm_lib_SCRIPTS)'; test -n "$(pm_libdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pm_libdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pm_libdir)$$dir" || exit $$?; \ } \ ; done uninstall-pm_libSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(pm_lib_SCRIPTS)'; test -n "$(pm_libdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pm_libdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pm_libdir)" && rm -f $$files install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(docdir)" && rm -f $$files install-dist_pm_libDATA: $(dist_pm_lib_DATA) @$(NORMAL_INSTALL) test -z "$(pm_libdir)" || $(MKDIR_P) "$(DESTDIR)$(pm_libdir)" @list='$(dist_pm_lib_DATA)'; test -n "$(pm_libdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pm_libdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pm_libdir)" || exit $$?; \ done uninstall-dist_pm_libDATA: @$(NORMAL_UNINSTALL) @list='$(dist_pm_lib_DATA)'; test -n "$(pm_libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pm_libdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pm_libdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pm_libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pm_libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dist_docDATA install-dist_pm_libDATA \ install-pm_libSCRIPTS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-exec-local install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-dist_docDATA uninstall-dist_pm_libDATA \ uninstall-pm_libSCRIPTS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-local \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_docDATA install-dist_pm_libDATA install-dvi \ install-dvi-am install-exec install-exec-am install-exec-local \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-pm_libSCRIPTS \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-dist_docDATA uninstall-dist_pm_libDATA \ uninstall-pm_libSCRIPTS install-exec-local: -mkdir $(DESTDIR)$(sysconfdir)/pm/config.d .in: $(do_subst) $< >$@ chmod +x $@ clean-local : rm -f *~ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pm-utils-1.4.1/pm/functions.in0000644000175000017500000001226311414117645013174 00000000000000#!/bin/sh # vim:noexpandtab # Common functionality for the hooks. # If a variable is set to true, yes, 1, or is simply set with no value, # return 0, otherwise return 1. is_set() { case ${1-UNSET} in true|yes|TRUE|YES|on|ON|1) return 0;; false|FALSE|no|NO|off|OFF|0) return 1;; *) return 2;; esac } # for great debugging! is_set "${PM_DEBUG}" && set -x # try to take the lock. Fail if we cannot get it. try_lock() { # $1 = file to use as lockfile local lock="${LOCKDIR}/${1##*/}" # make sure the directory where the lockfile should be exists mkdir -p "${LOCKDIR}" touch "${lock}" exec 3<"${lock}" flock -x -n 3 || return 1 return 0 } # spin waiting for the lock with optional timeout. # return once we have it, or the timeout has expired spin_lock() { # $1 = lockfile # $2 = optional timeout (default is 60 secs) local lock="${LOCKDIR}/${1##*/}" local timeout="${2:-60}" mkdir -p "${LOCKDIR}" touch "${lock}" exec 3<"${lock}" flock -x -w "${timeout}" 3 || return 1 return 0 } # release the lock release_lock() { # $1 = lockfile local lock="${LOCKDIR}/${1##*/}" rm -f "${lock}" return $? } command_exists() { # $1 = command to test for. It can be an executable in the path, # a shell function, or a shell builtin. type "$1" >/dev/null 2>&1 return $? } get_power_status() { on_ac_power case "$?" in "0") echo "ac" ;; "1") echo "battery" ;; "255") echo "error" return 1 ;; esac return 0 } # TODO: Module loading and unloading is Linux-specific. # Look into modularizing this into an os-specific set of support routines. _rmmod() { if modprobe -r "$1"; then touch "${STORAGEDIR}/module:$1" return 0 else log "# could not unload '$1', usage count was $2" return 1 fi } # this recursively unloads the given modules and all that depend on it # first parameter is the module to be unloaded modunload() { local MOD D C USED MODS I local UNL="$(echo $1 |tr - _)" RET=1 while read MOD D C USED D; do [ "$MOD" = "$UNL" ] || continue if [ "$USED" = "-" ]; then # no dependent modules, just try to remove this one. _rmmod "$MOD" $C RET=$? else # modules depend on this one. try to remove them first. MODS=",${USED%,}" while [ -n "${MODS}" ]; do # try to unload the last one first MOD="${MODS##*,}" modunload $MOD && RET=0 # prune the last one from the list MODS="${MODS%,*}" done # if we unloaded at least one module, then let's # try again! [ $RET -eq 0 ] && modunload $MOD RET=$? fi return $RET done < /proc/modules # if we came this far, there was nothing to do, # the module is no longer loaded. return 0 } # reload all the modules in no particular order. # modprobe should take care of loading prerequisites for us. modreload() { for x in "${STORAGEDIR}"/module:* ; do [ -O "${x}" ] || continue modprobe "${x##*:}" >/dev/null 2>&1 || \ log "Could not reload module ${x##*:}." done } # If the service command is not provided by the OS, we will fall back to # ${PM_UTILS_LIBDIR)/bin/service. stopservice() { if service "$1" status 2>/dev/null | grep -q -e running -e started then touch "${STORAGEDIR}/service:$1" service "$1" stop fi } restartservice() { [ -O "${STORAGEDIR}/service:$1" ] && service "$1" start } # Disable a hook. disablehook() { # $1 = name of hook to disable. # $2 = optional comment. echo "${2:-${0##*/}}" > "${STORAGEDIR}/disable_hook:${1##*/}" } # Save an arbitrary piece of state for later use. # If called with just one argument, it reads stdin and saves it to a file. # If called with 2 arguments, it saves $2 to a file. savestate() { # $1 = name of state to save # $2 (optional) State to save. If omitted, save stdin. if [ -n "$2" ]; then echo "$2" > "${STORAGEDIR}/state:$1" else cat > "${STORAGEDIR}/state:$1" fi } # Check to see of a piece of state exists. state_exists() { # $1 = name of state [ -O "${STORAGEDIR}/state:$1" ] } # Output previously saved state to stdout. restorestate() { # $1 = name of state state_exists "$1" && cat "${STORAGEDIR}/state:$1" } # Inhibit suspend/resume and running any more hooks. # Any parameters passed ti this function will be saved in the inhibit file. inhibit() { echo "$*" > "$INHIBIT" } # Are we inhibited? inhibited() { [ -f "$INHIBIT" ] } # If we were told by the user to ignore some parameters from HAL. # remove parameters from our list remove_parameters() { local p if [ "$1" = "all" ]; then echo '' > "$PARAMETERS.new" else echo '' >"$PARAMETERS.rm" for p in "$@"; do echo "$p" >> "$PARAMETERS.rm" done # let grep do the dirty work. grep -vxFf "$PARAMETERS.rm" "$PARAMETERS" > "$PARAMETERS.new" fi cp -f "$PARAMETERS.new" "$PARAMETERS" } # Add a parameter to our commandline parameters. add_parameters() { remove_parameters "$@" # no dups, please. for x in "$@"; do echo "$x" >>"$PARAMETERS" done } # Get our commandline parameters get_parameters() { cat "$PARAMETERS" } # check to see if a single parameter exists has_parameter() { for p in $(get_parameters); do [ "$p" = "$1" ] && return 0 done return 1 } # Like regular dbus-send, but returns $NA if the command fails for any reason. dbus_send () { command dbus-send "$@" 2>/dev/null || return $NA } pm-utils-1.4.1/pm/pm-functions.in0000644000175000017500000002213511414117645013605 00000000000000#!/bin/sh # vim:noexpandtab # Default values go here. It is important to _not_ initialize some # variables here. They are: # # PM_CMDLINE # RESUME_MODULES # # for great debugging! [ "${PM_DEBUG}" = "true" ] && { export PM_DEBUG set -x } set -a PM_UTILS_LIBDIR="@PM-UTILS-LIBDIR@" PM_UTILS_ETCDIR="@PM-UTILS-SYSCONFDIR@" PM_UTILS_RUNDIR="/var/run/pm-utils" PATH=/sbin:/usr/sbin:/bin:/usr/bin:"${PM_UTILS_LIBDIR}"/bin PM_LOGFILE="/var/log/${STASHNAME}.log" TEMPORARY_CPUFREQ_GOVERNOR="performance" LOCKDIR="${PM_UTILS_RUNDIR}/locks" STORAGEDIR="${PM_UTILS_RUNDIR}/${STASHNAME}/storage" NA=254 NX=253 DX=252 PM_FUNCTIONS="$PM_UTILS_LIBDIR/functions" PM_QUIRKDB="$PM_UTILS_LIBDIR/video-quirks" PM_LKW_QUIRKS="$PM_UTILS_ETCDIR/last_known_working.quirkdb" # 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="" HIBERNATE_RESUME_POST_VIDEO="no" SLEEP_MODULE="auto" # These variables will be handled specially when we load the config file. SUSPEND_MODULES="" HOOK_BLACKLIST="" ADD_PARAMETERS="" DROP_PARAMETERS="" PARAMETERS="${STORAGEDIR}/parameters" INHIBIT="${STORAGEDIR}/inhibit" PM_CMDLINE="$*" BEFORE_HOOKS="" MODULE_HELP="" SUSPEND_MODULE="" HIBERNATE_MODULE="" SUSPEND_HYBRID_MODULE="" # variables to handle hibernate after suspend support PM_HIBERNATE_DELAY=900 # 15 minutes PM_RTC=/sys/class/rtc/rtc0 # when loading configuration files, allow stash-specific ones # to override the pm-utils global ones. [ -f "${PM_UTILS_LIBDIR}"/defaults ] && . "${PM_UTILS_LIBDIR}"/defaults [ -f "${PM_UTILS_LIBDIR}/${STASHNAME}.defaults" ] && \ . "${PM_UTILS_LIBDIR}/${STASHNAME}.defaults" set +a for cfg in "${PM_UTILS_ETCDIR}"/config.d/*[!~] \ "${PM_UTILS_ETCDIR}/${STASHNAME}.config.d"/*[!~]; do [ -f "$cfg" ] || continue # Ugly, I know. The goal here is to allow multiple files in # /etc/pm/config.d declare these variables and have those # declarations add together instead of the last one overwriting # all the others. [ "$SUSPEND_MODULES" ] && REAL_SUSPEND_MODULES="$SUSPEND_MODULES" [ "$HOOK_BLACKLIST" ] && REAL_HOOK_BLACKLIST="$HOOK_BLACKLIST" [ "$ADD_PARAMETERS" ] && REAL_ADD_PARAMETERS="$ADD_PARAMETERS" [ "$DROP_PARAMETERS" ] && REAL_DROP_PARAMETERS="$DROP_PARAMETERS" set -a . "${cfg}" SUSPEND_MODULES="$REAL_SUSPEND_MODULES $SUSPEND_MODULES" HOOK_BLACKLIST="$REAL_HOOK_BLACKLIST $HOOK_BLACKLIST" ADD_PARAMETERS="$REAL_ADD_PARAMETERS $ADD_PARAMETERS" DROP_PARAMETERS="$REAL_DROP_PARAMETERS $DROP_PARAMETERS" set +a done . "${PM_FUNCTIONS}" # Simple little logging function. # We do it this way because 'echo -n' is not posix. log() { is_set "$LOGGING" || return 0; local fmt='%s\n' [ "$1" = "-n" ] && { fmt='%s'; shift; } printf "$fmt" "$*" } profiling() { [ "$PM_PROFILE" = "true" ]; } if profiling; then profile() { local t1 t2 status msg elapsed msg="$1" shift t1="$(date '+%s.%N')" "$@" status=$? t2="$(date '+%s.%N')" elapsed="$(printf "%s %s - p q" "$t2" "$t1" |dc)" log "$msg: $(printf "%.3f" $elapsed) ($t2 - $t1)" return $status } else profile() { shift; "$@"; } fi add_before_hooks() { [ -z "$BEFORE_HOOKS" ] && BEFORE_HOOKS="$*" || \ BEFORE_HOOKS="$BEFORE_HOOKS $*" } add_module_help() { [ -z "$MODULE_HELP" ] && MODULE_HELP="$*" || \ MODULE_HELP="$MODULE_HELP $*" } before_hooks() { [ -z "$BEFORE_HOOKS" ] && return 0 local meth for meth in $BEFORE_HOOKS; do command_exists "$meth" && "$meth" done } sleep_module_help() { [ -z "$MODULE_HELP" ] && return 0 local meth for meth in $MODULE_HELP; do command_exists "$meth" && "$meth" done } # update PM_CMDLINE iff someone changed our parameters update_parameters() { [ -f "$PARAMETERS.new" ] || return export PM_CMDLINE="$(get_parameters)" rm -f "$PARAMETERS.new" } # if the user asked us to blacklist any hooks, do it. load_hook_blacklist() { [ "$HOOK_BLACKLIST" ] || return local hook for hook in $HOOK_BLACKLIST; do disablehook "${hook}" "blacklisted by user" log "Blacklisting ${hook}." done } load_hook_parameters() { [ "$DROP_PARAMETERS" ] && remove_parameters $DROP_PARAMETERS [ "$ADD_PARAMETERS" ] && add_parameters $ADD_PARAMETERS update_parameters } hook_exit_status(){ case $1 in 0) log "success." ;; $NA) log "not applicable." ;; $NX) log "not executable." ;; $DX) log "disabled." ;; *) log "Returned exit code $1."; return 1 ;; esac } # check to see if a hook is a candidate for being run. hook_ok() { local hook="${1##*/}" # the actual name as passed to us. [ -f "$STORAGEDIR/disable_hook:$hook" ] && return $DX # name with leading digits chopped off the filename [ -f "$STORAGEDIR/disable_hook:${hook#[0-9][0-9]}" ] && return $DX [ -x "$1" ] || return $NX return 0 } _run_hook() { # $1 = hook to run # rest of args passed to hook unchanged. log "Running hook $*:" hook_ok "$1" && "$@" log "" log -n "$*: " hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit } if profiling; then run_hook() { profile "$1:" _run_hook "$@"; } else run_hook() { _run_hook "$@"; } fi # Run all applicable hooks, logging success and failure as we go. _run_hooks() { # $1 = type of hook to find. # $2 = paramaters to pass to hooks. # $3 = if present and equal to "reverse", run hooks backwards. # Currently only power and sleep are meaningful. local syshooks="${PM_UTILS_ETCDIR}/$1.d" local phooks="${PM_UTILS_LIBDIR}/$1.d" command_exists before_hooks && before_hooks local sort="sort" local base local hook local oifs="${IFS}" # the next two lines are not a typo or a formatting error! local nifs=" " IFS="${nifs}" # tolerate spaces in filenames. [ "$3" = "reverse" ] && sort="sort -r" for base in $(IFS="${oifs}"; for f in "$syshooks/"*[!~] "$phooks/"*[!~]; do [ -O "$f" ] && echo ${f##*/} ; done | $sort | uniq) ; do IFS="${oifs}" # if we are running backwards, skip hooks that we did not # run going forwards due to a hook failing. [ "$3" -a "$3" = "reverse" -a "$LAST_HOOK" ] && \ [ "$base" \> "$LAST_HOOK" ] && continue # if we have already inhibited suspend/resume, # don't run any more hooks. [ ! "$3" ] && inhibited && break update_parameters if [ -f "$syshooks/$base" ]; then hook="$syshooks/$base" elif [ -f "$phooks/$base" ]; then hook="$phooks/$base" fi run_hook "$hook" $2 IFS="${nifs}" done IFS="${oifs}" # return value is 1 if something was inhibited, 0 otherwise. inhibited && return 1 || return 0 } if profiling; then run_hooks() { profile "$1 $2:" _run_hooks "$@"; } else run_hooks() { _run_hooks "$@"; } fi # Try to reinitalize the logfile. Fail unless certian criteria are met. init_logfile() { if [ -z "$1" ]; then echo "Please pass a filename to init_logfile." return 1 elif [ -h "$1" ]; then echo "$1 is a symbolic link, refusing to overwrite." return 1 elif [ -f "$1" -a ! -O "$1" ]; then echo "We do not own $1, refusing to overwrite." return 1 fi export LOGGING=true exec > "$1" 2>&1 } check_suspend() { [ -n "$SUSPEND_MODULE" ]; } check_hibernate() { [ -n "$HIBERNATE_MODULE" ]; } check_suspend_hybrid() { [ -n "$SUSPEND_HYBRID_MODULE" ]; } # allow autodetection of sleep methods if [ "$SLEEP_MODULE" = "auto" ]; then SLEEP_MODULE="tuxonice uswsusp" fi for mod in $SLEEP_MODULE; do mod="${PM_UTILS_LIBDIR}/module.d/${mod}" [ -f "$mod" ] || continue . "$mod" done # always fall back to kernel methods if nothing else was declared if [ -z "$SUSPEND_MODULE" ]; then if grep -q mem /sys/power/state; then SUSPEND_MODULE="kernel" do_suspend() { echo -n "mem" >/sys/power/state; } elif [ -c /dev/pmu ] && pm-pmu --check; then SUSPEND_MODULE="kernel" do_suspend() { pm-pmu --suspend; } elif grep -q standby /sys/power/state; then SUSPEND_MODULE="kernel" do_suspend() { echo -n "standby" >/sys/power/state; } fi fi if [ -z "$HIBERNATE_MODULE" ] && \ [ -f /sys/power/disk ] && \ grep -q disk /sys/power/state; then HIBERNATE_MODULE="kernel" do_hibernate() { [ -n "${HIBERNATE_MODE}" ] && \ grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \ echo -n "${HIBERNATE_MODE}" > /sys/power/disk echo -n "disk" > /sys/power/state } fi # since the kernel does not directly support hybrid sleep, we do # something else -- suspend and schedule an alarm to go into # hibernate if we have slept long enough. # Only do this if we do not need to do any special video hackery on resume # from hibernate, though. if [ -z "$SUSPEND_HYBRID_MODULE" -a -w "$PM_RTC/wakealarm" ] && \ check_suspend && check_hibernate && ! is_set $HIBERNATE_RESUME_POST_VIDEO; \ then SUSPEND_HYBRID_MODULE="kernel" do_suspend_hybrid() { WAKETIME=$(( $(cat "$PM_RTC/since_epoch") + PM_HIBERNATE_DELAY)) echo >"$PM_RTC/wakealarm" echo $WAKETIME > "$PM_RTC/wakealarm" if do_suspend; then NOW=$(cat "$PM_RTC/since_epoch") if [ "$NOW" -ge "$WAKETIME" -a "$NOW" -lt $((WAKETIME + 30)) ]; then log "Woken by RTC alarm, hibernating." # if hibernate fails for any reason, go back to suspend. do_hibernate || do_suspend else echo > "$PM_RTC/wakealarm" fi else # if we cannot suspend, just try to hibernate. do_hibernate fi } fi pm-utils-1.4.1/pm/sleep.d/0000755000175000017500000000000011414120570012231 500000000000000pm-utils-1.4.1/pm/sleep.d/Makefile.am0000644000175000017500000000053311414116753014216 00000000000000sleepdir = $(libdir)/pm-utils/sleep.d sleep_SCRIPTS = \ 00logging \ 00powersave \ 01grub \ 49bluetooth \ 55NetworkManager \ 75modules \ 90clock \ 94cpufreq \ 95led \ 98video-quirk-db-handler \ 99video EXTRA_DIST=$(sleep_SCRIPTS) install-exec-local: -mkdir -p $(DESTDIR)$(sysconfdir)/pm/sleep.d clean-local : rm -f *~ pm-utils-1.4.1/pm/sleep.d/Makefile.in0000644000175000017500000002662411414120262014226 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pm/sleep.d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(sleepdir)" SCRIPTS = $(sleep_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sleepdir = $(libdir)/pm-utils/sleep.d sleep_SCRIPTS = \ 00logging \ 00powersave \ 01grub \ 49bluetooth \ 55NetworkManager \ 75modules \ 90clock \ 94cpufreq \ 95led \ 98video-quirk-db-handler \ 99video EXTRA_DIST = $(sleep_SCRIPTS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pm/sleep.d/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pm/sleep.d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sleepSCRIPTS: $(sleep_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(sleepdir)" || $(MKDIR_P) "$(DESTDIR)$(sleepdir)" @list='$(sleep_SCRIPTS)'; test -n "$(sleepdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sleepdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sleepdir)$$dir" || exit $$?; \ } \ ; done uninstall-sleepSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(sleep_SCRIPTS)'; test -n "$(sleepdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sleepdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sleepdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(sleepdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sleepSCRIPTS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-exec-local install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sleepSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-exec-local install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sleepSCRIPTS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-sleepSCRIPTS install-exec-local: -mkdir -p $(DESTDIR)$(sysconfdir)/pm/sleep.d clean-local : rm -f *~ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pm-utils-1.4.1/pm/sleep.d/00logging0000755000175000017500000000042211414116753013673 00000000000000#!/bin/sh # Log some extra information at the beginning of a suspend/resume cycle. # TODO: Make this hook only run when PM_DEBUG is true? . "${PM_FUNCTIONS}" case "$1" in hibernate|suspend) [ -n "$PM_LOGFILE" ] || exit 0 /bin/uname -a lsmod free ;; esac pm-utils-1.4.1/pm/sleep.d/00powersave0000644000175000017500000000031311414116753014254 00000000000000#!/bin/sh . "${PM_FUNCTIONS}" command_exists pm-powersave || exit $NA case $1 in suspend|hibernate) pm-powersave false ;; resume|thaw) pm-powersave ;; *) exit $NA ;; esac exit 0 pm-utils-1.4.1/pm/sleep.d/01grub0000644000175000017500000000145111414116753013205 00000000000000#!/bin/sh # Ensure grub will load the correct kernel on resume from hibernate, # TODO: This is rather redhat specific, and very grub specific. default_resume_kernel() { [ "$1" = "suspend" ] && return $NA case $(uname -m) in i?86|x86_64|athlon) ;; *) # this is only valid for x86 and x86_64 return $NA ;; esac [ -x /sbin/grubby -a -x /sbin/grub ] || return $NA [ -e "/boot/vmlinuz-$(uname -r)" ] || return 1 out=$(/sbin/grubby --info /boot/vmlinuz-$(uname -r) |grep index) [ -n "${out}" ] || return 1 current=${out#index=} echo "savedefault --default=${current} --once" | \ /sbin/grub --device-map=/boot/grub/device.map \ --batch --no-floppy --no-curses >/dev/null return 0 } case "$1" in hibernate|suspend) default_resume_kernel $2 ;; *) exit $NA ;; esac pm-utils-1.4.1/pm/sleep.d/49bluetooth0000755000175000017500000000123011414116753014265 00000000000000#!/bin/sh # IBM specific hack to disable/enable bluetooth. # TODO: Doesn't the working USB suspend/resume functionality # make this code more or less obsolete? . "${PM_FUNCTIONS}" [ -f /proc/acpi/ibm/bluetooth ] || exit $NA suspend_bluetooth() { if grep -q enabled /proc/acpi/ibm/bluetooth; then savestate ibm_bluetooth enable echo disable > /proc/acpi/ibm/bluetooth else savestate ibm_bluetooth disable fi } resume_bluetooth() { state_exists ibm_bluetooth || return restorestate ibm_bluetooth > /proc/acpi/ibm/bluetooth } case "$1" in hibernate|suspend) suspend_bluetooth ;; thaw|resume) resume_bluetooth ;; *) exit $NA ;; esac pm-utils-1.4.1/pm/sleep.d/55NetworkManager0000755000175000017500000000226011414117645015206 00000000000000#!/bin/sh # If we are running NetworkManager, tell it we are going to sleep. # TODO: Make NetworkManager smarter about how to handle sleep/resume # If we are asleep for less time than it takes for TCP to reset a # connection, and we are assigned the same IP on resume, we should # not break established connections. Apple can do this, and it is # rather nifty. . "${PM_FUNCTIONS}" suspend_nm() { # Tell NetworkManager to shut down networking printf "Having NetworkManager put all interaces to sleep..." dbus_send --system \ --dest=org.freedesktop.NetworkManager \ /org/freedesktop/NetworkManager \ org.freedesktop.NetworkManager.sleep && \ echo Done. || echo Failed. } resume_nm() { # Wake up NetworkManager and make it do a new connection printf "Having NetworkManager wake interfaces back up..." dbus_send --system \ --dest=org.freedesktop.NetworkManager \ /org/freedesktop/NetworkManager \ org.freedesktop.NetworkManager.wake && \ echo Done. || echo Failed. } case "$1" in hibernate|suspend) suspend_nm ;; thaw|resume) resume_nm ;; *) exit $NA ;; esac pm-utils-1.4.1/pm/sleep.d/75modules0000755000175000017500000000070511414117645013736 00000000000000#!/bin/sh # Unload requested modules. . "${PM_FUNCTIONS}" suspend_modules() { [ -z "$SUSPEND_MODULES" ] && return $NA for x in $SUSPEND_MODULES ; do printf "Unloading kernel module %s..." "$x" modunload $x && echo Done. || echo Failed. done return 0 } resume_modules() { modreload echo "Reloaded unloaded modules." } case "$1" in hibernate|suspend) suspend_modules ;; thaw|resume) resume_modules ;; *) exit $NA ;; esac pm-utils-1.4.1/pm/sleep.d/90clock0000755000175000017500000000114611414117645013356 00000000000000#!/bin/sh # Synchronize system time with hardware time. # Modern kernels handle this correctly so we skip this hook by default. . "${PM_FUNCTIONS}" suspend_clock() { printf "Saving system time to hardware clock..." /sbin/hwclock --systohc >/dev/null 2>&1 0<&1 && echo Done. || \ echo Failed. } resume_clock() { printf "Loading system time from hardware clock..." /sbin/hwclock --hctosys >/dev/null 2>&1 0<&1 && echo Done. || \ echo Failed. } is_set "$NEED_CLOCK_SYNC" || exit $NA case "$1" in hibernate|suspend) suspend_clock ;; thaw|resume) resume_clock ;; *) exit $NA ;; esac pm-utils-1.4.1/pm/sleep.d/94cpufreq0000755000175000017500000000211211414116753013725 00000000000000#!/bin/sh # Ensure cpu governor is set to something sane. # TODO: Which of the cpu governors is still insane? File bugs against # those that are. . "${PM_FUNCTIONS}" [ -d /sys/devices/system/cpu/ ] || exit $NA hibernate_cpufreq() { ( cd /sys/devices/system/cpu/ for x in cpu[0-9]*; do # if cpufreq is a symlink, it is handled by another cpu. Skip. [ -L "$x/cpufreq" ] && continue gov="$x/cpufreq/scaling_governor" # if we do not have a scaling_governor file, skip. [ -f "$gov" ] || continue # if our temporary governor is not available, skip. grep -q "$TEMPORARY_CPUFREQ_GOVERNOR" \ "$x/cpufreq/scaling_available_governors" || continue savestate "${x}_governor" < "$gov" echo "$TEMPORARY_CPUFREQ_GOVERNOR" > "$gov" done ) } thaw_cpufreq() { ( cd /sys/devices/system/cpu/ for x in cpu[0-9]*/cpufreq/scaling_governor ; do [ -f "$x" ] || continue state_exists "${x%%/*}_governor" || continue restorestate "${x%%/*}_governor" > "$x" done ) } case "$1" in suspend|hibernate) hibernate_cpufreq ;; resume|thaw) thaw_cpufreq ;; *) exit $NA ;; esac pm-utils-1.4.1/pm/sleep.d/95led0000755000175000017500000000045111414116753013031 00000000000000#!/bin/sh # On an IBM system. make the suspend LED blink. # TODO: Merge with 95led? Should be trivial. [ -f /proc/acpi/ibm/led ] || exit $NA case "$1" in hibernate|suspend) echo "7 blink" >/proc/acpi/ibm/led ;; thaw|resume) echo "7 off" >/proc/acpi/ibm/led ;; *) exit $NA ;; esac pm-utils-1.4.1/pm/sleep.d/98video-quirk-db-handler0000755000175000017500000003310511414117645016530 00000000000000#!/bin/bash # Prototype video quirk database handler that does not rely on HAL. shopt -s extglob . "${PM_FUNCTIONS}" [[ $PM_DEBUG ]] && { export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): '; set -x } possible_video_quirks=" --quirk-dpms-on --quirk-dpms-suspend --quirk-s3-mode --quirk-s3-bios --quirk-vbe-post --quirk-vbe-post --quirk-vga-mode-3 --quirk-vbemode-restore --quirk-vbestate-restore --quirk-reset-brightness --quirk-radeon-off --quirk-no-fb --quirk-save-pci" possible_system_properties="system.firmware.version system.firmware.vendor system.firmware.release_date system.hardware.vendor system.hardware.product system.hardware.version system.board.product system.board.version system.board.vendor system.hardware.primary_video.vendor system.hardware.primary_video.product system.hardware.primary_video.driver system.hardware.primary_video.using_kms system.kernel.version" has_video_parameters() { local p params=$(get_parameters) [[ $params ]] || return 1 for p in $params; do [[ $possible_video_quirks = *$p* ]] && return done return 1 } # video specific helper functions. # Are we using the nVidia binary driver? using_nvidia() { [[ -d /sys/module/nvidia ]]; } # How about the ATI one? using_fglrx() { [[ -d /sys/module/fglrx ]]; } # OK, what about a driver that is using kernel modesetting? using_kms() { grep -q -E '(nouveau|drm)fb' /proc/fb; } # Get some video related values when HAL has not gotten them for us, or # HAL is not available. videoget() { local dev pci pci="/sys/bus/pci/devices" for dev in "$pci"/*; do [[ -f "${dev}/class" ]] || continue [[ "$(cat "${dev}/class")" = "0x030000" ]] || continue case $1 in vendor) RES="$(cat "${dev}/vendor")" ;; device) RES="$(cat "${dev}/device")" ;; driver) if [[ -L ${dev}/driver ]]; then RES="$(readlink "${dev}/driver")" RES="${RES##*/}" elif using_nvidia; then RES=nvidia elif using_fglrx; then RES=fglrx fi ;; using_kms) if using_kms; then RES=true else RES=false fi ;; esac break done } # Get some important information about this system. # If we have /sys/class/dmi/id, life is easy, and we do not need to # depend on HAL or dmidecode. _dmisysget() { [[ -r /sys/class/dmi/id/$1 ]] || RES="" read RES < "/sys/class/dmi/id/$1" } dmisysget() { case $1 in system.firmware.vendor) _dmisysget bios_vendor ;; system.firmware.version) _dmisysget bios_version ;; system.firmware.release_date) _dmisysget bios_date ;; system.hardware.vendor) _dmisysget sys_vendor ;; system.hardware.product) _dmisysget product_name ;; system.hardware.version) _dmisysget product_version ;; system.board.product) _dmisysget board_name ;; system.board.version) _dmisysget board_version ;; system.board.vendor) _dmisysget board_vendor ;; system.hardware.primary_video.vendor) videoget vendor ;; system.hardware.primary_video.product) videoget device ;; system.hardware.primary_video.driver) videoget driver ;; system.hardware.primary_video.using_kms) videoget using_kms ;; system.kernel.version) RES=$(uname -r) ;; *) return 1 esac } # Get system information using dmidecode. Slow and ugly, but # should be supported just about everywhere. _dmidecodeget() { RES=$(dmidecode -s $1) } dmidecodeget() { case $1 in system.firmware.vendor) _dmidecodeget bios-vendor ;; system.firmware.version) _dmidecodeget bios-version ;; system.firmware.release_date) _dmidecodeget bios-release-date;; system.hardware.vendor) _dmidecodeget system-manufacturer;; system.hardware.product) _dmidecodeget system-product-name;; system.hardware.version) _dmidecodeget system-version;; system.board.product) _dmidecodeget baseboard-product-name;; system.board.version) _dmidecodeget baseboard-version;; system.board.vendor) _dmidecodeget baseboard-manufacturer;; *) return 1 esac } # If we have HAL, it has already done most of the work for us. halget() { local hgp="hal-get-property --udi /org/freedesktop/Hal/devices/computer --key" case $1 in system.firmware.version) RES=$($hgp "$1") ;; system.firmware.vendor) RES=$($hgp "$1") ;; system.firmware.release_date) RES=$($hgp "$1") ;; system.hardware.vendor) RES=$($hgp "$1") ;; system.hardware.product) RES=$($hgp "$1") ;; system.hardware.version) RES=$($hgp "$1") ;; system.board.product) RES=$($hgp "$1") ;; system.board.version) RES=$($hgp "$1") ;; system.board.vendor) RES=$($hgp "$1") ;; *) return 1 esac } canonicalize_dmivar() { [[ $1 =~ ^[a-z._-]+$ && $possible_system_properties = *$1* ]] || return 1 echo "${1//[-.]/_}" } # Precache the DMI and other information we will need as shell variables. # This will make things easier when we start running for real. precache_dmivars() { local p q f for q in $possible_system_properties; do p=$(canonicalize_dmivar $q) || return 1 RES="" for f in dmisysget halget dmidecodeget; do "$f" "$q" && break || continue 2 done RES="${RES##+( )}" RES="${RES%%+( )}" read "$p" <<<$RES done RES="" } # Use bash variable indirection to set RES to the actual parameter # we are looking for. Sanity check the variable we were passed to # keep things sane. getprop() { RES="" local p if ! p=$(canonicalize_dmivar $1); then echo "Unable to obtain DMI information for $1" >&2 exit 1 fi RES="${!p}" } # test to see if the parameter passed is a decimal or hexidecimal number # Note the complete lack of floating point support. isnum() { [[ $1 =~ ^[0-9]+\$ || $1 =~ ^0[xX][0-9a-fA-F]+\$ ]] } # for all the matching functions, # $2 = the given constant (or regular expression), # $1 = the raw data grabbed from HAL or dmidecode or wherever regex() { [[ $1 =~ ${2//;/|} ]]; } regex_ncase() { local r shopt -s nocasematch regex "$1" "$2" r=$? shopt -u nocasematch return $r } regex_inverse() { ! regex "$1" "$2"; } compare_eq() { [[ $1 = $2 ]]; } compare_ne() { [[ $1 != $2 ]]; } compare_gt() { [[ $1 > $2 ]]; } compare_ge() { compare_eq "$@" || compare_gt "$@"; } compare_lt() { [[ $1 < $2 ]]; } compare_le() { compare_eq "$@" || compare_lt "$@"; } numeric_compare_eq() { (( $1 == $2 )); } numeric_compare_ne() { (( $1 != $2 )); } numeric_compare_gt() { (( $1 > $2 )); } numeric_compare_ge() { (( $1 >= $2 )); } numeric_compare_lt() { (( $1 < $2 )); } numeric_compare_le() { (( $1 <= $2 )); } numeric_compare_eq_list() { local key val # $1 = key val to compare # $2 = list to compare to key=$1 val="${2//;/ }" for x in $val; do (( $key == $x )) && return 0 done return 1 } # Helper function for nVidia g80 gpus. They require extra special handling # when not using the nVidia binary driver. have_nvidia_g80() { numeric_compare_eq $system_hardware_primary_video_vendor 0x10de || return numeric_compare_eq_list $system_hardware_primary_video_product \ '0x190;0x191;0x192;0x193;0x194;0x195;0x196;0x197;0x198;0x199;0x19a;0x19b;0x19c;0x19d;0x19e;0x19f;0x400;0x401;0x402;0x403;0x404;0x405;0x406;0x407;0x408;0x409;0x40a;0x40b;0x40c;0x40d;0x40e;0x40f;0x420;0x421;0x422;0x423;0x424;0x425;0x426;0x427;0x428;0x429;0x42a;0x42b;0x42c;0x42d;0x42e;0x42f' || return } # Helper function for recent Intel framebuffer drivers. have_smart_intel() { local kernel_rev=$system_kernel_revision local driver=$system_hardware_primary_video_driver # currently, intel kernel modesetting is not quite smart enough # we still need acpi s3 kernel modesetting hooks, so don't remove those # options if they were passed. [[ $driver = i915 && ( $kernel_rev > 2.6.26 || $kernel_rev = 2.6.26 ) ]] } # find the appropriate quirks for this system using the native-format # quirks database. Since the database is tree-ish, we use some stupid # recursion tricks. # $1 = whether to ignore what we are reading _find_native() { local action key matcher regex while read action key matcher regex; do [[ $action && ${action:0:1} != '#' ]] || continue case $action in match) if [[ $1 = ignore ]]; then _find_native $1 else getprop "$key" [[ $matcher && $regex ]] || find_native ignore # if this matcher matches, look at nodes farther out. if $matcher "$RES" "$regex"; then _find_native work else _find_native ignore fi fi ;; endmatch) [[ $found ]] && return 0 || return 1 ;; addquirk) [[ $1 = ignore ]] && continue found=true add_parameters "$key" ;; delquirk) [[ $1 = ignore ]]&& continue found=true remove_parameters "$key" ;; esac done } find_native() ( [[ -f $1 ]] || return 1 exec <"$1" _find_native work res=$? get_parameters return $res ) # If we resumed, write out the quirks we used as our last known # working ones for this hardware, kernel, driver, and KMS setting. write_last_known_working() ( local matcher quirk precache_dmivars exec >"$PM_LKW_QUIRKS" for prop in system.firmware.version system.firmware.vendor \ system.firmware.release_date system.hardware.vendor \ system.hardware.product system.hardware.version \ system.board.product system.board.version system.board.vendor \ system.hardware.primary_video.vendor \ system.hardware.primary_video.product \ system.hardware.primary_video.driver \ system.hardware.primary_video.using_kms \ system.kernel.version; do getprop "$prop" if isnum "$RES"; then matcher=numeric_compare_eq else matcher=compare_eq fi echo "match $prop $matcher ${RES}" done if [[ $QUIRKS ]]; then for quirk in $QUIRKS; do echo "addquirk $quirk" done else echo "addquirk --quirk-none" fi for ((x=1; x<14; x++)); do echo endmatch done ) case $1 in suspend|hibernate) # Aaand.... GO # cache all the properties we will need. precache_dmivars # This logic can also be expressed using entries in the quirkdb, # but I am too lazy to do that until a final quirk database is # formalized. if has_parameter --quirk-test && has_video_parameters; then # The user is explicitly testing video parameters. # Use them without the usual filtering. This may cause the system # to blow up, but they explicitly asked for it. remove_parameters --quirk-test echo "Quirk testing mode enabled." elif using_kms; then # Using kernel modesetting? No quirks, and do not change vts. remove_parameters $possible_video_quirks add_parameters --quirk-no-chvt echo "Kernel modesetting video driver detected, not using quirks." elif using_nvidia; then # Ditto for nVidia binary drivers remove_parameters $possible_video_quirks echo "nVidia binary video drive detected, not using quirks." elif using_fglrx; then # fglrx may or may not have to change vts, reports one # way or the other welcome. remove_parameters $possible_video_quirks add_parameters --quirk-none echo "ATI Catalyst driver detected, not using quirks." elif have_nvidia_g80; then # nVidia G80 GPUs require special handling when not using nvidia # binary drivers. I do not know if noveau requires help or not. remove_parameters $possible_video_quirks add_parameters --quirk-vbe-post echo "nVidia g80 series card detected." else # Go ahead and get our quirks. if has_video_parameters; then # Parameters from the command line take precedence # over the database, so do not query it. echo "Using quirks passed as parameters." elif [[ $PM_QUIRKS ]]; then # If we have $PM_QUIRKS. use it instead of the quirk database add_parameters $PM_QUIRKS echo "Using PM_QUIRKS environment variable for quirks." # If we were not passed any quirks on the command line, # get them from the database. elif QUIRKS=$(find_native "$PM_LKW_QUIRKS"); then # Known working quirks from our last run are still valid. # Use them. add_parameters $QUIRKS echo "Using last known working set of quirks." else # Our known working quirks from the last run are either # nonexistent or invalid. Either way, start over. rm "$PM_LKW_QUIRKS" >/dev/null 2>&1 for f in "$PM_QUIRKDB"/*.quirkdb do QUIRKS=$(find_native "$f") && break done # some default quirks if we did not get any. if [[ -z $QUIRKS ]]; then QUIRKS="--quirk-vbe-post --quirk-dpms-on --quirk-dpms-suspend --quirk-vbestate-restore --quirk-vbemode-restore --quirk-vga-mode-3" echo "No quirk database entry for this system, using default." else echo "Using quirks for this system from quirk database." fi add_parameters $QUIRKS savestate video_quirks "$QUIRKS" fi if have_smart_intel; then # Intel without KMS does not require most quirks, no matter # what anything else says. The only ones that seem to # matter are the --quirk-s3 ones, so remove everything else. remove_parameters --quirk-dpms-on \ --quirk-dpms-suspend \ --quirk-vbe-post \ --quirk-vbe-post \ --quirk-vga-mode-3 \ --quirk-vbemode-restore \ --quirk-vbestate-restore \ --quirk-reset-brightness \ --quirk-radeon-off \ --quirk-no-fb \ --quirk-save-pci echo "Cleaning up quirks not needed by Intel video cards." fi fi ;; thaw|resume) if state_exists video_quirks; then QUIRKS=$(restorestate video_quirks); write_last_known_working echo "Saving last known working quirks: $QUIRKS" elif has_parameter --store-quirks-as-lkw; then for x in $(get_parameters); do for y in $possible_video_quirks; do [[ $x = $y ]] && QUIRKS=" $QUIRKS $x" done done write_last_known_working echo "Saving last known working quirks: $QUIRKS" fi ;; esac pm-utils-1.4.1/pm/sleep.d/99video0000755000175000017500000001304311414116753013400 00000000000000#!/bin/sh # # Copyright 2006-2007 Richard Hughes # Copyright 2007 Peter Jones # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # Handle video quirks. If you are having suspend/resume issues, # troubleshooting using this hook is probably the best place to start. # If it weren't for video card quirks, suspend/resume on Linux would be # a whole lot more stable. . "${PM_FUNCTIONS}" for opt in $PM_CMDLINE; do case "${opt##--quirk-}" in # just quirks, please dpms-on) QUIRK_DPMS_ON="true" ;; dpms-suspend) QUIRK_DPMS_SUSPEND="true" ;; radeon-off) QUIRK_RADEON_OFF="true" ;; reset-brightness) QUIRK_RESET_BRIGHTNESS="true" ;; s3-bios) QUIRK_S3_BIOS="true" ;; s3-mode) QUIRK_S3_MODE="true" ;; vbe-post) QUIRK_VBE_POST="true" ;; vbemode-restore) QUIRK_VBEMODE_RESTORE="true" ;; vbestate-restore) QUIRK_VBESTATE_RESTORE="true" ;; vga-mode-3) QUIRK_VGA_MODE_3="true" ;; no-fb) QUIRK_NOFB="true" ;; save-pci) QUIRK_SAVE_PCI="true" ;; no-chvt) QUIRK_NO_CHVT="true" ;; none) QUIRK_NONE="true" ;; *) continue ;; esac done reset_brightness() { for bl in /sys/class/backlight/* ; do [ -f "$bl/brightness" ] || continue BR="$(cat $bl/brightness)" echo 0 > "$bl/brightness" echo "$BR" > "$bl/brightness" done } if command_exists vbetool; then vbe() { vbetool "$@"; } else vbe() { echo "vbetool not installed!" 1>&2; return 1; } fi if command_exists radeontool; then radeon() { radeontool "$@"; } else radeon() { echo "radeontool not found" 1>&2; return 1; } fi die_if_framebuffer() { [ -d "/sys/class/graphics/fb0" ] || return echo "--quirk-no-fb passed, but system is using a framebuffer." echo "Aborting." exit 1 } save_fbcon() { local con for con in /sys/class/graphics/*/state; do [ -f $con ] || continue echo 1 >"${con}" done } resume_fbcon() { local con for con in /sys/class/graphics/*/state; do [ -f $con ] || continue echo 0 >"${con}" done } maybe_chvt() { is_set "$QUIRK_NO_CHVT" && return fgconsole |savestate console chvt 63 } maybe_deallocvt() { state_exists console || return 0 chvt $(restorestate console) deallocvt 63 } # Some tiny helper functions for quirk handling quirk() { is_set "$1" && [ -z $QUIRK_NONE ]; } # save/restore vbe state vbe_savestate() { vbe vbestate save |savestate vbestate; } vbe_restorestate() { restorestate vbestate |vbe vbestate restore; } # save/restore the vbe mode vbe_savemode() { vbe vbemode get |savestate vbemode; } vbe_restoremode() { # this is a little mode complicated to handle special-casing mode 3. local vbemode=$(restorestate vbemode) if [ "$vbemode" = "3" ]; then vbe vgamode set $vbemode else vbe vbemode set $vbemode fi } # post the video card vbe_post() { local rom="/var/run/video.rom" # if we do not have a romfile, do not post with it. [ -f "$rom" ] || unset rom vbe post $rom sleep 0.1 } # turn critical bits of radeon cards off/on radeon_off() { radeon dac off; radeon light off; } radeon_on() { radeon dac on; radeon light on; } # save and restore video card PCI config state save_pci() { local pci="/sys/bus/pci/devices" for dev in "${pci}"/*; do [ -f "${dev}/class" ] || continue [ $(cat "${dev}/class") = "0x030000" ] || continue [ -f "${dev}/config" ] || continue # it is a video card, it has a configuration. Save it. savestate "pci_video_${dev##*/}" <${dev}/config done } restore_pci() { local pci="/sys/bus/pci/devices" for dev in "${pci}"/*; do state_exists "pci_video_${dev##*/}" || continue restorestate "pci_video_${dev##*/}" > "${dev}/config" done } suspend_video() { # 0=nothing, 1=s3_bios, 2=s3_mode, 3=both local acpi_flag=0 quirk "${QUIRK_S3_BIOS}" && acpi_flag=$(($acpi_flag + 1)) quirk "${QUIRK_S3_MODE}" && acpi_flag=$(($acpi_flag + 2)) sysctl -w kernel.acpi_video_flags=$acpi_flag quirk "${QUIRK_NOFB}" && die_if_framebuffer quirk "${QUIRK_VBESTATE_RESTORE}" && vbe_savestate quirk "${QUIRK_VBEMODE_RESTORE}" && vbe_savemode quirk "${QUIRK_RADEON_OFF}" && radeon_off quirk "${QUIRK_SAVE_PCI}" && save_pci quirk "${QUIRK_VGA_MODE_3}" && vbe vbemode set 3 quirk "${QUIRK_DPMS_SUSPEND}" && vbe dpms suspend save_fbcon } resume_video() { # We might need to do one or many of these quirks quirk "${QUIRK_SAVE_PCI}" && restore_pci quirk "${QUIRK_VBE_POST}" && vbe_post quirk "${QUIRK_VBESTATE_RESTORE}" && vbe_restorestate quirk "${QUIRK_VBEMODE_RESTORE}" && vbe_restoremode resume_fbcon # also should be handled by a quirk. quirk "${QUIRK_RADEON_OFF}" && radeon_on quirk "${QUIRK_DPMS_ON}" && vbe dpms on quirk "${QUIRK_RESET_BRIGHTNESS}" && reset_brightness return 0 # avoid spurious hook exit failure message. } help() { echo # first echo makes it look nicer. echo "Video quirk handler options:" echo echo " --quirk-dpms-on" echo " --quirk-dpms-suspend" echo " --quirk-radeon-off" echo " --quirk-reset-brightness" echo " --quirk-s3-bios" echo " --quirk-s3-mode" echo " --quirk-vbe-post" echo " --quirk-vbemode-restore" echo " --quirk-vbestate-restore" echo " --quirk-vga-mode-3" echo " --quirk-none" } case "$1" in suspend) maybe_chvt; suspend_video ;; hibernate) maybe_chvt if is_set "$HIBERNATE_RESUME_POST_VIDEO"; then suspend_video fi ;; resume) resume_video; maybe_deallocvt;; thaw) if is_set "${HIBERNATE_RESUME_POST_VIDEO}"; then resume_video fi maybe_deallocvt ;; help) help ;; esac pm-utils-1.4.1/pm/power.d/0000755000175000017500000000000011414120570012255 500000000000000pm-utils-1.4.1/pm/power.d/Makefile.am0000644000175000017500000000057111414117645014245 00000000000000powerdir = $(libdir)/pm-utils/power.d power_SCRIPTS = \ sched-powersave \ harddrive \ laptop-mode \ xfs_buffer \ readahead \ intel-audio-powersave \ wireless \ journal-commit \ disable_wol \ pcie_aspm \ sata_alpm \ hal-cd-polling EXTRA_DIST=$(power_SCRIPTS) install-exec-local: -mkdir -p $(DESTDIR)$(sysconfdir)/pm/power.d clean-local : rm -f *~ pm-utils-1.4.1/pm/power.d/Makefile.in0000644000175000017500000002666211414120262014254 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pm/power.d DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(powerdir)" SCRIPTS = $(power_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ powerdir = $(libdir)/pm-utils/power.d power_SCRIPTS = \ sched-powersave \ harddrive \ laptop-mode \ xfs_buffer \ readahead \ intel-audio-powersave \ wireless \ journal-commit \ disable_wol \ pcie_aspm \ sata_alpm \ hal-cd-polling EXTRA_DIST = $(power_SCRIPTS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pm/power.d/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pm/power.d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-powerSCRIPTS: $(power_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(powerdir)" || $(MKDIR_P) "$(DESTDIR)$(powerdir)" @list='$(power_SCRIPTS)'; test -n "$(powerdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(powerdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(powerdir)$$dir" || exit $$?; \ } \ ; done uninstall-powerSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(power_SCRIPTS)'; test -n "$(powerdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(powerdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(powerdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(powerdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-powerSCRIPTS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-exec-local install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-powerSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-exec-local install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-powerSCRIPTS install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-powerSCRIPTS install-exec-local: -mkdir -p $(DESTDIR)$(sysconfdir)/pm/power.d clean-local : rm -f *~ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pm-utils-1.4.1/pm/power.d/sched-powersave0000644000175000017500000000121411414117645015226 00000000000000#!/bin/sh # Based on the values (1-enable, 0-disable) for these controls, # sched groups cpu power will be determined for different domains. # When power savings policy is enabled and under light load conditions, # scheduler will minimize the physical packages/cpu cores carrying the # load and thus conserving power sched_powersave() { for pool in mc smp smt; do dev="/sys/devices/system/cpu/sched_${pool}_power_savings" [ -w "$dev" ] || continue echo $1 > "$dev" done } case "$1" in true) echo "**sched policy powersave ON" sched_powersave 1 ;; false) echo "**sched policy powersave OFF" sched_powersave 0 ;; esac exit 0 pm-utils-1.4.1/pm/power.d/harddrive0000644000175000017500000000572211414117645014107 00000000000000#!/bin/sh [ -x /sbin/hdparm ] || exit $NA # Default values on AC DRIVE_SPINDOWN_VALUE_AC="${DRIVE_SPINDOWN_VALUE_AC:-0}" DRIVE_WRITE_CACHE_AC="${DRIVE_WRITE_CACHE_AC:-1}" DRIVE_POWER_MGMT_AC="${DRIVE_POWER_MGMT_AC:-254}" DRIVE_ACOUSTIC_MGMT_AC="${DRIVE_ACOUSTIC_MGMT_AC:-0}" # Default values on battery DRIVE_SPINDOWN_VALUE_BAT="${DRIVE_SPINDOWN_VALUE_BAT:-6}" DRIVE_WRITE_CACHE_BAT="${DRIVE_WRITE_CACHE_BAT:-0}" DRIVE_POWER_MGMT_BAT="${DRIVE_POWER_MGMT_BAT:-1}" DRIVE_ACOUSTIC_MGMT_BAT="${DRIVE_ACOUSTIC_MGMT_BAT:-254}" # Default devices to operate on DRIVE_LIST="/dev/[hs]d[a-z]" help() { cat </dev/null 2>&1 \ && echo Done. || echo Failed. done } harddrive_battery() { for dev in $DRIVE_LIST; do # disable write caching, enable acoustic management printf "Enabling power management for %s..." "$dev" hdparm -W $DRIVE_WRITE_CACHE_BAT \ -S $DRIVE_SPINDOWN_VALUE_BAT \ -B $DRIVE_POWER_MGMT_BAT \ -M $DRIVE_ACOUSTIC_MGMT_BAT -F $dev >/dev/null 2>&1 \ && echo Done. || echo Failed. done } case $1 in true) harddrive_battery ;; false) harddrive_ac ;; help) help;; *) exit $NA ;; esac exit 0 pm-utils-1.4.1/pm/power.d/laptop-mode0000644000175000017500000000524211414117645014355 00000000000000#!/bin/sh . "${PM_FUNCTIONS}" VM="/proc/sys/vm" vmfiles="laptop_mode dirty_ratio dirty_background_ratio dirty_writeback_centisecs" LAPTOP_MODE=${LAPTOP_MODE:-5} LAPTOP_DIRTY_RATIO=${LAPTOP_DIRTY_RATIO:-60} LAPTOP_DIRTY_BG_RATIO=${LAPTOP_DIRTY_BG_RATIO:-40} LAPTOP_DIRTY_WRITEBACK=${LAPTOP_DIRTY_WRITEBACK:-60000} help() { cat < "$VM/$f" shift done } laptop_mode_ac() { # disable laptop mode, set vm parameters back to sane defaults if state_exists laptop_mode_default; then write_values $(restorestate laptop_mode_default) else write_values 0 10 5 500 fi echo "Laptop mode disabled." } laptop_mode_battery() { # enable laptop mode, set vm parameters to buffer as many writes as # possible. state_exists laptop_mode_default || \ read_values | savestate laptop_mode_default write_values "$LAPTOP_MODE" "$LAPTOP_DIRTY_RATIO" \ "$LAPTOP_DIRTY_BG_RATIO" "$LAPTOP_DIRTY_WRITEBACK" echo "Laptop mode enabled." } case $1 in true) laptop_mode_battery ;; false) laptop_mode_ac ;; help) help;; *) exit $NA ;; esac exit 0 pm-utils-1.4.1/pm/power.d/xfs_buffer0000644000175000017500000000315211414117645014263 00000000000000#!/bin/sh . "${PM_FUNCTIONS}" XFS="/proc/sys/fs/xfs" xfsfiles="age_buffer_centisecs xfssyncd_centisecs xfsbufd_centisecs" XFS_AGE_BUFFER=${XFS_AGE_BUFFER:-60000} XFS_BUFD=${XFS_BUFD:-3000} XFS_SYNCD=${XFS_SYNCD:-60000} help() { cat < "$XFS/$f" shift done } # Why does XFS have its own parameters instead of just using the # VM subsystem ones? Only SGI knows... xfs_ac() { if state_exists xfs_buffer_default; then write_values $(restorestate xfs_buffer_default) else write_values 1500 3000 100 fi } xfs_battery() { state_exists xfs_buffer_default || \ read_values |savestate xfs_buffer_default write_values "$XFS_AGE_BUFFER" "$XFS_BUFD" "$XFS_SYNCD" } case $1 in true) xfs_battery ;; false) xfs_ac ;; help) help;; *) exit $NA ;; esac exit 0pm-utils-1.4.1/pm/power.d/readahead0000644000175000017500000000230611414117645014030 00000000000000#!/bin/sh [ -x /sbin/blockdev ] || exit $NA # more readahead = (hopefully) less hard drive activity. # less readahead = less trashing the page cache. DRIVE_READAHEAD_AC=${DRIVE_READAHEAD_AC:-256} DRIVE_READAHEAD_BAT=${DRIVE_READAHEAD_BAT:-3072} help() { cat < "$dev/parameters/power_save" && echo Done. || echo Failed. done } case $1 in true) audio_powersave 1 ;; false) audio_powersave 0 ;; help) help;; *) exit $NA esac exit 0 pm-utils-1.4.1/pm/power.d/wireless0000644000175000017500000000467711414117645014004 00000000000000#!/bin/sh . "${PM_FUNCTIONS}" # See if we have the usual wireless tools. # Do not just fail because not all cards require these. which iwpriv >/dev/null 2>&1 && have_iwpriv="true" which iwconfig >/dev/null 2>&1 && have_iwconfig="true" # If only all the drivers did The Right Thing with iwconfig power. # Too bad they do not. get_wireless_params() { # $1 = interface # $2 = on or off unset iwpriv iwconfig iwlevel # Don't do anything if we cannot find a driver for this iface. [ -L "/sys/class/net/$1/device/driver" ] || return 1 # Skip if not a wireless card. [ -d "/sys/class/net/$1/wireless" ] || return 1 # Also don't do anything if the device is disabled [ "$(cat /sys/class/net/$1/device/enable)" = "1" ] || return 1 driver="$(readlink "/sys/class/net/$1/device/driver")" driver=${driver##*/} case $driver in ipw2100) iwpriv_ac="set_power 0" iwpriv_batt="set_power 5" iwconfig_ac="power on" iwconfig_batt="power on";; ipw3945) iwpriv_ac="set_power 6" iwpriv_batt="set_power 7";; iwl*) if [ -f "/sys/class/net/$1/device/power_level" ]; then iwlevel_ac=0 iwlevel_batt=3 else iwconfig_ac="power off" iwconfig_batt="power on" fi;; *) iwconfig_ac="power off" iwconfig_batt="power on";; esac case $2 in off) [ "$iwpriv_ac" ] && iwpriv="$iwpriv_ac" [ "$iwconfig_ac" ] && iwconfig="$iwconfig_ac" [ "$iwlevel_ac" ] && iwlevel="$iwlevel_ac";; on) [ "$iwpriv_batt" ] && iwpriv="$iwpriv_batt" [ "$iwconfig_batt" ] && iwconfig="$iwconfig_batt" [ "$iwlevel_batt" ] && iwlevel="$iwlevel_batt";; esac return 0 } wireless_powersave() { for dev in /sys/class/net/*; do get_wireless_params "${dev##*/}" "$1" || continue ret=0 printf "Turning powersave for %s %s..." "${dev##*/}" "$1" if [ "$have_iwconfig" = true -a "$iwconfig" ]; then iwconfig "${dev##*/}" $iwconfig || ret=1 fi if [ "$have_iwpriv" = true -a "$iwpriv" ]; then iwpriv "${dev##*/}" $iwpriv || ret=1 fi if [ "$iwlevel" ]; then echo "$iwlevel" > "$dev/device/power_level" || ret=1 fi [ "$ret" -eq 0 ] && echo Done. || echo Failed. done } case $1 in true) wireless_powersave on ;; false) wireless_powersave off ;; *) exit $NA ;; esac exit 0pm-utils-1.4.1/pm/power.d/journal-commit0000644000175000017500000000241211414117645015070 00000000000000#!/bin/sh . ${PM_FUNCTIONS} JOURNAL_COMMIT_TIME_AC=${JOURNAL_COMMIT_TIME_AC:-0} JOURNAL_COMMIT_TIME_BAT=${JOURNAL_COMMIT_TIME_BAT:-600} help() { cat </dev/null 2>&1;; enable) ethtool -s "${d##*/}" wol g>/dev/null 2>&1;; esac [ "$?" -eq 0 ] && echo Done. || echo Failed. done } case $1 in true) set_wol_status disable;; false) set_wol_status enable;; *) exit $NA;; esac exit 0pm-utils-1.4.1/pm/power.d/pcie_aspm0000644000175000017500000000031111414117645014064 00000000000000#!/bin/sh aspm="/sys/module/pcie_aspm/parameters/policy" [ -w "$aspm" ] || exit $NA case $1 in true) echo powersave > "$aspm";; false) echo default > "$aspm";; *) exit $NA;; esac exit 0pm-utils-1.4.1/pm/power.d/sata_alpm0000644000175000017500000000215111414117645014071 00000000000000#!/bin/sh . "${PM_FUNCTIONS}" SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-true} help() { cat < "$f/link_power_management_policy" && echo Done. || \ echo Failed. done } case $1 in true) [ "$SATA_ALPM_ENABLE" = true ] && set_sata_alpm min_power;; false) set_sata_alpm max_performance;; help) help;; *) exit $NA;; esac exit 0pm-utils-1.4.1/pm/power.d/hal-cd-polling0000755000175000017500000000244411414117645014732 00000000000000#!/bin/sh . "${PM_FUNCTIONS}" DISABLE_HAL_POLLING="${DISABLE_HAL_POLLING:-true}" help() { cat <<"EOF" --- $0: Keep HAL from polling optical media for disk insertion Keep HAL from polling optical media while on battery. This saves a few tenths of a watt. This hook has 1 parameter: DISABLE_HAL_POLLING = true or false. If true, this hook will turn off the poll HAL does every 2 seconds to see if media has been inserted into an optical drive. If false, this hook does nothing. EOF } stop_polling() { [ "$DISABLE_HAL_POLLING" = "true" ] || exit $NA command_exists hal-disable-polling || exit $NA local disks="$(for c in /dev/cd/*; do readlink -f "$c"; done |sort |uniq)" [ "$disks" ] || exit $NA savestate hal_polling_disks "$disks" for c in $disks; do printf "Disabling HAL polling of %s..." "$c" hal-disable-polling --device "$c" >/dev/null 2>&1 \ && echo Done. || echo Failed. done } restart_polling() { state_exists hal_polling_disks || exit $NA for disk in $(restorestate hal_polling_disks); do printf "Reenabling HAL polling of %s..." "$disk" hal-disable-polling --enable-polling --device "$disk" && echo Done || \ echo Failed. done } case $1 in true) stop_polling;; false) restart_polling;; help) help;; *) exit $NA;; esac pm-utils-1.4.1/pm/module.d/0000755000175000017500000000000011414120571012407 500000000000000pm-utils-1.4.1/pm/module.d/kernel0000755000175000017500000000017011414116753013542 00000000000000#!/bin/sh # this file is a stub -- pm-functions will always fall back to kernel methods # if nothing else is available.pm-utils-1.4.1/pm/module.d/tuxonice0000755000175000017500000000303411414117645014123 00000000000000#!/bin/sh export TUXONICE_LOC # TODO tuxonice supports all sorts of knobs to twiddle. Since this should be as # simple as possible, it does not provide a mechanism for twiddling those knobs. # If you need more customization than this file has, consider using a hook to # set the appropriate values. # more locations might be nice for loc in "/sys/power/tuxonice" "/sys/power/suspend2"; do [ -d "${loc}" ] && { TUXONICE_LOC="${loc}"; break; } done if [ -n "$TUXONICE_LOC" ]; then toi_maybe_chvt() { local toi_ui="$(cat "$TUXONICE_LOC/user_interface/program")" local toi_ui_en="$(cat "$TUXONICE_LOC/user_interface/enabled")" if [ -x "$toi_ui" ] && [ "$toi_ui_en" = 1 ] && \ ! state_exists console; then fgconsole |savestate console chvt 63 fi } fi if [ -z "$HIBERNATE_MODULE" -a -n "$TUXONICE_LOC" ] && \ [ -f "${TUXONICE_LOC}/do_hibernate" ]; then HIBERNATE_MODULE="tuxonice" do_hibernate() { toi_maybe_chvt echo 5 > "${TUXONICE_LOC}/powerdown_method" echo anything > "${TUXONICE_LOC}/do_hibernate" } fi if [ -z "$SUSPEND_HYBRID_MODULE" -a -n "$TUXONICE_LOC" ] && \ grep -q mem /sys/power/state && \ [ -f "${TUXONICE_LOC}/do_hibernate" ]; then SUSPEND_HYBRID_MODULE="tuxonice" do_suspend_hybrid() { toi_maybe_chvt r=0 echo 3 >"${TUXONICE_LOC}/powerdown_method" echo anything >"${TUXONICE_LOC}/do_hibernate" r=$? [ -f /sys/power/tuxonice/did_suspend_to_both ] && \ [ "$(cat /sys/power/tuxonice/did_suspend_to_both)" != "1" ] && \ REVERSE="thaw" return $r } fi pm-utils-1.4.1/pm/module.d/uswsusp0000755000175000017500000000611111414116753014014 00000000000000#!/bin/sh # disable processing of 90chvt and 99video. # s2ram and s2disk handle all this stuff internally. uswsusp_hooks() { disablehook 99video "disabled by uswsusp" } # Since we disabled 99video, we need to take responsibility for proper # quirk handling. s2ram handles all common video quirks internally, # so all we have to do is translate the HAL standard options to s2ram options. uswsusp_get_quirks() { OPTS="" ACPI_SLEEP=0 for opt in $PM_CMDLINE; do case "${opt##--quirk-}" in # just quirks, please dpms-on) ;; # no-op dpms-suspend) ;; # no-op radeon-off) OPTS="$OPTS --radeontool" ;; reset-brightness) ;; # no-op s3-bios) ACPI_SLEEP=$(($ACPI_SLEEP + 1)) ;; s3-mode) ACPI_SLEEP=$(($ACPI_SLEEP + 2)) ;; vbe-post) OPTS="$OPTS --vbe_post" ;; vbemode-restore) OPTS="$OPTS --vbe_mode" ;; vbestate-restore) OPTS="$OPTS --vbe_save" ;; vga-mode-3) ;; # no-op save-pci) OPTS="$OPTS --pci_save" ;; none) QUIRK_NONE="true" ;; *) continue ;; esac done [ $ACPI_SLEEP -ne 0 ] && OPTS="$OPTS --acpi_sleep $ACPI_SLEEP" # if we were told to ignore quirks, do so. # This is arguably not the best way to do things, but... [ "$QUIRK_NONE" = "true" ] && OPTS="" } # Since we disabled 99video, we also need to handle displaying # help info for the quirks we handle. uswsusp_help() { echo # first echo makes it look nicer. echo "s2ram video quirk handler options:" echo echo " --quirk-radeon-off" echo " --quirk-s3-bios" echo " --quirk-s3-mode" echo " --quirk-vbe-post" echo " --quirk-vbemode-restore" echo " --quirk-vbestate-restore" echo " --quirk-save-pci" echo " --quirk-none" } # This idiom is used for all sleep methods. Only declare the actual # do_ method if: # 1: some other sleep module has not already done so, and # 2: this sleep method can actually work on this system. # # For suspend, if SUSPEND_MODULE is set then something else has already # implemented do_suspend. We could just check to see of do_suspend was # already declared using command_exists, but using a dedicated environment # variable makes it easier to debug when we have to know what sleep module # ended up claiming ownership of a given sleep method. if [ -z "$SUSPEND_MODULE" ] && command_exists s2ram && \ ( grep -q mem /sys/power/state || \ ( [ -c /dev/pmu ] && pm-pmu --check; ); ); then SUSPEND_MODULE="uswsusp" do_suspend() { uswsusp_get_quirks s2ram --force $OPTS } if [ "$METHOD" = "suspend" ]; then add_before_hooks uswsusp_hooks add_module_help uswsusp_help fi fi if [ -z "$HIBERNATE_MODULE" ] && \ [ -f /sys/power/disk ] && \ grep -q disk /sys/power/state && \ [ -c /dev/snapshot ] && command_exists s2disk; then HIBERNATE_MODULE="uswsusp" do_hibernate() { s2disk } fi if [ -z "$SUSPEND_HYBRID_MODULE" ] && grep -q mem /sys/power/state && \ command_exists s2both && \ check_hibernate; then SUSPEND_HYBRID_MODULE="uswsusp" do_suspend_hybrid() { uswsusp_get_quirks s2both --force $OPTS } if [ "$METHOD" = "suspend_hybrid" ]; then add_before_hooks uswsusp_hooks add_module_help uswsusp_help fi fi pm-utils-1.4.1/pm/module.d/Makefile.am0000644000175000017500000000017211414116753014372 00000000000000moduledir = $(libdir)/pm-utils/module.d dist_module_SCRIPTS = \ kernel \ tuxonice \ uswsusp clean-local : rm -f *~ pm-utils-1.4.1/pm/module.d/Makefile.in0000644000175000017500000002636411414120262014404 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = pm/module.d DIST_COMMON = $(dist_module_SCRIPTS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(moduledir)" SCRIPTS = $(dist_module_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ moduledir = $(libdir)/pm-utils/module.d dist_module_SCRIPTS = \ kernel \ tuxonice \ uswsusp all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pm/module.d/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pm/module.d/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-dist_moduleSCRIPTS: $(dist_module_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)" @list='$(dist_module_SCRIPTS)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(moduledir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(moduledir)$$dir" || exit $$?; \ } \ ; done uninstall-dist_moduleSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_module_SCRIPTS)'; test -n "$(moduledir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(moduledir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(moduledir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(moduledir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_moduleSCRIPTS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_moduleSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-dist_moduleSCRIPTS install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-dist_moduleSCRIPTS clean-local : rm -f *~ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pm-utils-1.4.1/man/0000755000175000017500000000000011414120571011037 500000000000000pm-utils-1.4.1/man/Makefile.am0000644000175000017500000000125611414116753013026 00000000000000pm_mans = \ on_ac_power.1 \ pm-is-supported.1 \ pm-pmu.8 \ pm-powersave.8 \ pm-action.8 if HAVE_XMLTO man_MANS = $(pm_mans) endif EXTRA_DIST = \ on_ac_power.xml \ pm-pmu.xml \ pm-is-supported.xml \ pm-powersave.xml \ pm-action.xml \ $(pm_mans) MAINTAINERCLEANFILES = \ $(pm_mans) .xml.1: $(XMLTO) man $< .xml.8: $(XMLTO) man $< install-data-hook: install-man @if test -f $(DESTDIR)$(mandir)/man8/pm-action.8; then \ for page in pm-suspend pm-hibernate pm-suspend-hybrid; do \ echo ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8; \ ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8 || exit 1; \ done; \ fi clean-local : rm -f *~ pm-utils-1.4.1/man/Makefile.in0000644000175000017500000003451311414120262013027 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pm_mans = \ on_ac_power.1 \ pm-is-supported.1 \ pm-pmu.8 \ pm-powersave.8 \ pm-action.8 @HAVE_XMLTO_TRUE@man_MANS = $(pm_mans) EXTRA_DIST = \ on_ac_power.xml \ pm-pmu.xml \ pm-is-supported.xml \ pm-powersave.xml \ pm-action.xml \ $(pm_mans) MAINTAINERCLEANFILES = \ $(pm_mans) all: all-am .SUFFIXES: .SUFFIXES: .1 .8 .xml $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-man8: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" @list=''; test -n "$(man8dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man8 .MAKE: install-am install-data-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-man8 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-man uninstall-man1 uninstall-man8 .xml.1: $(XMLTO) man $< .xml.8: $(XMLTO) man $< install-data-hook: install-man @if test -f $(DESTDIR)$(mandir)/man8/pm-action.8; then \ for page in pm-suspend pm-hibernate pm-suspend-hybrid; do \ echo ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8; \ ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8 || exit 1; \ done; \ fi clean-local : rm -f *~ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pm-utils-1.4.1/man/on_ac_power.xml0000644000175000017500000000452411414116753014010 00000000000000 05 June, 2006"> GNU"> GPL"> ]>
richard@hughsie.com;
Richard Hughes 2006 Richard Hughes &date;
&package; 1 &package; test whether the computer is running on line power &package; DESCRIPTION This manual page documents briefly the &package; command. &package; is a command line program to test whether the computer is running on line power EXIT CODES The command succeeds (status 0) if the system is using line power and fails (status other than 0) otherwise. It is designed to be easy to use in shell scripts. System is on line power. System is not on line power. SEE ALSO pm-suspend 8 AUTHOR This manual page was written by Richard Hughes richard@hughsie.com.
pm-utils-1.4.1/man/pm-pmu.xml0000644000175000017500000000607011414116753012726 00000000000000 05 June, 2006"> GNU"> GPL"> ]>
richard@hughsie.com;
Richard Hughes 2006 Richard Hughes &date;
&package; 8 &package; suspend the computer on machines using a Macintosh-style PMU &package; DESCRIPTION This manual page documents briefly the &package; command. &package; is a command line program to suspend a computer on machines using a Macintosh-style PMU EXIT CODES The command succeeds (status 0) if the machine uses a Macintosh-style PMU, and suspended successfully. The command fails (status other than 0) otherwise. It is designed to be easy to use in shell scripts. System was suspended using PMU. System could not be suspended using PMU. OPTIONS This program follows the usual &gnu; command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. Suspend the computer. Show help message. SEE ALSO pm-suspend 8 AUTHOR This manual page was written by Richard Hughes richard@hughsie.com.
pm-utils-1.4.1/man/pm-is-supported.xml0000644000175000017500000001304111414117645014560 00000000000000 Debian"> GNU"> GPL"> ]> &dhtitle; &dhpackage; &dhdate; &dhfirstname; &dhsurname; Manpage author.
&dhemail;
2007 &dhusername; This manual page was originally written for the &debian; system, and has been adopted by the pm-utils project. Permission is granted to copy, distribute and/or modify this document under the terms of the &gnu; General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.
&dhucpackage; &dhsection; &dhpackage; Test whether suspend or hibernate is supported. &dhpackage; DESCRIPTION This manual page documents briefly the &dhpackage; command. The intended purpose of &dhpackage; is to find out which power management modes are supported by the system. hald(8) will call it to do just that. (Note that UPower does not use this.) OPTIONS Test whether suspend is supported. Suspend is a state where most devices are shutdown, except for RAM. This state still draws power. Test whether hibernate is supported. During hibernate the state of the system is saved to disk, the system is fully powered off. Test whether hybrid-suspend is supported. Hybrid-suspend is the process where first the state of the system is saved to disk -- just like with hibernate -- but instead of poweroff, the system goes in suspend state, which means it can wakeup quicker than for normal hibernation. The advantage over suspend is that you can resume even if you run out of power. s2both is a hybrid-suspend implementation. RETURN VALUE The result of the test for a certain powermanagement state is defined by the following exit codes. Code Diagnostic 0 State available. 1 State NOT available. SEE ALSO hald 8 , pm-suspend 8 , s2both 8 , UPower 7
pm-utils-1.4.1/man/pm-powersave.xml0000644000175000017500000001150211414117012014121 00000000000000 Debian"> GNU"> GPL"> ]> &dhtitle; &dhpackage; &dhdate; &dhfirstname; &dhsurname; Manpage author.
&dhemail;
2007 &dhusername; This manual page was originally written for the &debian; system, and has been adopted by the pm-utils project. Permission is granted to copy, distribute and/or modify this document under the terms of the &gnu; General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.
&dhucpackage; &dhsection; &dhpackage; Put your computer into low power mode &dhpackage; DESCRIPTION This manual page documents briefly the &dhpackage; command. &dhpackage; can be used to set your system into low power mode. OPTIONS Put the computer into low power mode to reduce energy consumption and extend your laptop's battery life. Turn off low power mode. FILES /etc/pm/power.d/ /usr/lib/pm-utils/power.d/ When you run pm-powersave it combines the scripts in these two directories and executes them in sorted order. If both directories contain a script with the same name, the one in /etc/pm/power.d/ has a higher precedence and only this one will be executed. Therefore to disable a script from /usr/lib/pm-utils/power.d/ simply create an empty file in /etc/pm/power.d/ with the same name and without the executable bit set. SEE ALSO pm-suspend 8 , pm-hibernate 8
pm-utils-1.4.1/man/pm-action.xml0000644000175000017500000004673311414117645013415 00000000000000 Debian"> GNU"> GPL"> ]> &dhtitle; &dhpackage; &dhdate; &dhfirstname; &dhsurname; Manpage author.
&dhemail;
2007 &dhusername; This manual page was originally written for the &debian; system, and has been adopted by the pm-utils project. Permission is granted to copy, distribute and/or modify this document under the terms of the &gnu; General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.
&dhucpackage; &dhsection; &dhpackage; Suspend or Hibernate your computer pm-hibernate --help pm-suspend --quirk-* --help pm-suspend-hybrid --quirk-* --help DESCRIPTION This manual page documents briefly the &dhpackage;, pm-hibernate, pm-suspend and pm-suspend-hybrid commands. This manual page was originally written for the &debian; distribution and has been adopted by the pm-utils project. These commands can be used to put the machine in a sleep state. The precise way how this is done can be influenced by installing executables and configuration snippets. For some options external programs are needed. These commands will usually be called by UPower or hald when triggered to do so by a program in a desktop session such as gnome-power-manager. Calling them from the command line is also possible, but it is not guaranteed that all programs in your desktop session keep working as expected. During suspend most devices are shutdown, and system state is saved in RAM. The system still requires power in this state. Most modern systems require 3 to 5 seconds to enter and leave suspend, and most laptops can stay in suspend mode for 1 to 3 days before exhausting their battery. During hibernate the system is fully powered off, and system state is saved to disk. The system does not require power, and can stay in hibernate mode indefinitely. Most modern systems require 15 to 45 seconds to enter and leave hibernate, and entering and leaving hibernate takes longer when you have more memory. Hybrid-suspend is the process where the system does everything it needs to hibernate, but suspends instead of shutting down. This means that your computer can wake up quicker than for normal hibernation if you do not run out of power, and you can resume even if you run out of power. s2both(8) is an hybrid-suspend implementation. OPTIONS On some hardware putting the video card in the suspend state and recovering from it needs some special quirk handling. With the --quirk-* options of the pm-suspend and pm-suspend-hybrid commands you can select which quirks should be used. If pm-suspend, pm-hibernate, or pm-suspend-hybrid are invoked without any commandline parameters, they will try to grab the correct quirks from the internal quirk database. This option forces the video hardware to turn on the screen during resume. Most video adapters turn on the screen themselves, but if you get a blank screen on resume that can be turned back on by moving the mouse or typing then this option may be useful. This option forces the video hardware to turn off the screen when suspending. Most video adapters seem to do this correctly, but some do not, which wastes lots of power. If your screen is still on after successfully suspending you may need to use this option. This option forces Radeon hardware to turn off the display during suspend and turn it back on during resume. You only need to do this on some old ThinkPads of the '30 series (T30, X31, R32,... ) with Radeon video hardware. This option calls the video BIOS during S3 resume. Unfortunately, it is not always allowed to call the video BIOS at this point, so sometimes adding this option can actually break resume on some systems. This option initializes the video card into a VGA text mode, and then uses the BIOS to set the video mode. On some systems S3 BIOS only initializes the video BIOS to text mode, and so both S3 BIOS and S3 MODE are needed. This option will attempt to reinitialize the video card when resuming from suspend, using the same code the system BIOS uses at boot in order to initialize the video hardware. Not all video cards need this, and using this option on systems where it is not needed can cause a system to lock up when resuming. This option will save and restore the current VESA mode which may be necessary to avoid X screen corruption. Using this feature on Intel graphics hardware is probably a bad idea. This option saves and restores some low level hardware state which may be invalid after suspend. This option will try to force the video card into a standard text mode on resume. Save the PCI config space for the VGA card. Save the quirks the video adaptor required by pm-suspend or pm-suspend-hybrid as an .quirkdb file that is specific to this system. The file will be saved in /etc/pm/last_known_working.quirkdb. This parameter will only save the actual quirks that were used to successfully suspend/resume a system, and will be specific to the exact configuration of that system, including the video hardware, video driver, and whether or not kernel modesetting was used. FILES /etc/pm/config.d The files in this directory are evaluated in C sort order. These files can be provided by individual packages outside of pm-utils. If a global configuration variable is set, the value set to will be appended to the previous value. If any other variable is set, it will be ignored. The syntax is simply: VAR_NAME=value. See the CONFIGURATION VARIABLES section for valid variables defined by pm-utils. External packages can define others, see their respective documentation for more information. /etc/pm/sleep.d /usr/lib/pm-utils/sleep.d Programs in these directories (called hooks) are combined and executed in C sort order before suspend and hibernate with as argument 'suspend' or 'hibernate'. Afterwards they are called in reverse order with argument 'resume' and 'thaw' respectively. If both directories contain a similar named file, the one in /etc/pm/sleep.d will get preference. It is possible to disable a hook in the distribution directory by putting a non-executable file in /etc/pm/sleep.d, or by adding it to the HOOK_BLACKLIST configuration variable. /var/log/pm-suspend.log The log file shows what was done on the last suspend/hibernate and resume/thaw. SLEEP HOOK ORDERING CONVENTION 00 - 49 User and most package supplied hooks. If a hook assumes that all of the usual services and userspace infrastructure is still running, it should be here. 50 - 74 Service handling hooks. Hooks that start or stop a service belong in this range. At or before 50, hooks can assume that all services are still enabled. 75 - 89 Module and non-core hardware handling. If a hook needs to load/unload a module, or if it needs to place non-video hardware that would otherwise break suspend or hibernate into a safe state, it belongs in this range. At or before 75, hooks can assume all modules are still loaded. 90 - 99 Reserved for critical suspend hooks. CONFIGURATION VARIABLES Configuration variables defined by pm-utils. These can be set in any file in /etc/pm/config.d/. SLEEP_MODULE [=kernel] The default suspend backend to use. Valid values are: kernel The built-in kernel suspend/resume support. Use this if nothing else is supported on your system. The kernel backend is always used if nothing else is available. uswsusp If your system has support for the userspace suspend programs (s2ram/s2disk/s2both), then use this. tuxonice If your system has support for tuxonice/suspend2, use this. HIBERNATE_RESUME_POST_VIDEO [=no] If video should be posted after hibernate, just like after suspend. You should not normally need to set this. SUSPEND_MODULES Space separated list of modules to unload before suspend. HOOK_BLACKLIST Space separated list of hooks that should be disabled. HIBERNATE_MODE Default method to power down the system when hibernating. If not set, the system will use the kernel default as a default value. Check /sys/power/disk for valid values. The default value will be surrounded by [square brackets]. NEED_CLOCK_SYNC If your system clock drifts across a suspend/resume or hibernate/thaw cycle, you should set this to true. This will cause pm-utils to synchronize the system clock whenever going through a sleep/wake cycle at the expense of making suspend/resume take longer. PM_HIBERNATE_DELAY [=900] If you are using kernel suspend/resume and invoke pm-suspend-hybrid, this environment variable controls how many seconds the system will wait after going into suspend before waking back up and hibernating. By default, this is set to 900 seconds (15 minutes). RETURN VALUES Return values less than 128 mean that pm-action failed before trying to put the system in the requested power saving state. A return value of 128 means that pm-action tried to put the machine in the requested power state but failed. A return value greater than 128 means pm-action encountered an error and also failed to enter the requested power saving state. DEBUGGING Debugging suspend/resume can be a tricky process, and is covered in more detail in /usr/share/doc/pm-utils/README.debugging. BUGS The upstream BTS can be found at . Select 'pm-utils' as product. SEE ALSO s2ram 8 , s2disk 8 , s2both 8 , pm-is-supported 1 , pm-powersave 8 , vbetool 8 , radeontool 8
pm-utils-1.4.1/man/on_ac_power.10000644000175000017500000000315011414120271013330 00000000000000'\" t .\" Title: on_ac_power .\" Author: Richard Hughes .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 05 June, 2006 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "ON_AC_POWER" "1" "05 June, 2006" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" on_ac_power \- test whether the computer is running on line power .SH "SYNOPSIS" .HP \w'\fBon_ac_power\fR\ 'u \fBon_ac_power\fR .SH "DESCRIPTION" .PP This manual page documents briefly the \fBon_ac_power\fR command\&. .PP \fBon_ac_power\fR is a command line program to test whether the computer is running on line power .SH "EXIT CODES" .PP The command succeeds (status 0) if the system is using line power and fails (status other than 0) otherwise\&. It is designed to be easy to use in shell scripts\&. .PP \fB0 (true)\fR .RS 4 System is on line power\&. .RE .PP \fB1 (false)\fR .RS 4 System is not on line power\&. .RE .SH "SEE ALSO" .PP \fBpm-suspend\fR(8) .SH "AUTHOR" .PP This manual page was written by Richard Hughes richard@hughsie\&.com\&. .SH "AUTHOR" .PP \fBRichard Hughes\fR .RS 4 Author. .RE .SH "COPYRIGHT" .br Copyright \(co 2006 Richard Hughes .br pm-utils-1.4.1/man/pm-is-supported.10000644000175000017500000000606411414120273014116 00000000000000'\" t .\" Title: pm-is-supported .\" Author: Tim Dijkstra .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: Apr 18, 2007 .\" Manual: pm-utils User Manual .\" Source: pm-is-supported .\" Language: English .\" .TH "PM\-IS\-SUPPORTED" "1" "Apr 18, 2007" "pm-is-supported" "pm-utils User Manual" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pm-is-supported \- Test whether suspend or hibernate is supported\&. .SH "SYNOPSIS" .HP \w'\fBpm\-is\-supported\fR\ 'u \fBpm\-is\-supported\fR [{\fB\-\-suspend\fR\ |\ \fB\-\-hibernate\fR\ |\ \fB\-\-suspend\-hybrid\fR}] .SH "DESCRIPTION" .PP This manual page documents briefly the \fBpm\-is\-supported\fR command\&. .PP The intended purpose of \fBpm\-is\-supported\fR is to find out which power management modes are supported by the system\&. hald(8) will call it to do just that\&. (Note that UPower does not use this\&.) .SH "OPTIONS" .PP \fB\-\-suspend\fR .RS 4 Test whether suspend is supported\&. Suspend is a state where most devices are shutdown, except for RAM\&. This state still draws power\&. .RE .PP \fB\-\-hibernate\fR .RS 4 Test whether hibernate is supported\&. During hibernate the state of the system is saved to disk, the system is fully powered off\&. .RE .PP \fB\-\-suspend\-hybrid\fR .RS 4 Test whether hybrid\-suspend is supported\&. Hybrid\-suspend is the process where first the state of the system is saved to disk \-\- just like with hibernate \-\- but instead of poweroff, the system goes in suspend state, which means it can wakeup quicker than for normal hibernation\&. The advantage over suspend is that you can resume even if you run out of power\&. s2both is a hybrid\-suspend implementation\&. .RE .SH "RETURN VALUE" .PP The result of the test for a certain powermanagement state is defined by the following exit codes\&. .\" line length increase to cope w/ tbl weirdness .ll +(\n(LLu * 62u / 100u) .TS ll. \fICode\fR \fIDiagnostic\fR T{ \fB0\fR T} T{ State available\&. T} T{ \fB1\fR T} T{ State NOT available\&. T} .TE .\" line length decrease back to previous value .ll -(\n(LLu * 62u / 100u) .sp .SH "SEE ALSO" .PP \fBhald\fR(8), \fBpm-suspend\fR(8), \fBs2both\fR(8), \fBUPower\fR(7) .SH "AUTHOR" .PP \fBTim Dijkstra\fR <\&tim@famdijkstra\&.org\&> .RS 4 Manpage author\&. .RE .SH "COPYRIGHT" .br Copyright \(co 2007 Tim Dijkstra .br .PP This manual page was originally written for the Debian(TM) system, and has been adopted by the pm\-utils project\&. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation\&. .sp pm-utils-1.4.1/man/pm-pmu.80000644000175000017500000000366511414120276012277 00000000000000'\" t .\" Title: pm-pmu .\" Author: Richard Hughes .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 05 June, 2006 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "PM\-PMU" "8" "05 June, 2006" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pm-pmu \- suspend the computer on machines using a Macintosh\-style PMU .SH "SYNOPSIS" .HP \w'\fBpm\-pmu\fR\ 'u \fBpm\-pmu\fR .SH "DESCRIPTION" .PP This manual page documents briefly the \fBpm\-pmu\fR command\&. .PP \fBpm\-pmu\fR is a command line program to suspend a computer on machines using a Macintosh\-style PMU .SH "EXIT CODES" .PP The command succeeds (status 0) if the machine uses a Macintosh\-style PMU, and suspended successfully\&. The command fails (status other than 0) otherwise\&. It is designed to be easy to use in shell scripts\&. .PP \fB0 (true)\fR .RS 4 System was suspended using PMU\&. .RE .PP \fB1 (false)\fR .RS 4 System could not be suspended using PMU\&. .RE .SH "OPTIONS" .PP This program follows the usual GNU command line syntax, with long options starting with two dashes (`\-\')\&. A summary of options is included below\&. .PP \fB\-\-suspend\fR .RS 4 Suspend the computer\&. .RE .PP \fB\-\-help\fR .RS 4 Show help message\&. .RE .SH "SEE ALSO" .PP \fBpm-suspend\fR(8) .SH "AUTHOR" .PP This manual page was written by Richard Hughes richard@hughsie\&.com\&. .SH "AUTHOR" .PP \fBRichard Hughes\fR .RS 4 Author. .RE .SH "COPYRIGHT" .br Copyright \(co 2006 Richard Hughes .br pm-utils-1.4.1/man/pm-powersave.80000644000175000017500000000452611414120300013472 00000000000000'\" t .\" Title: pm-powersave .\" Author: Michael Biebl .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: Mar 5, 2007 .\" Manual: pm-utils User Manual .\" Source: pm-powersave .\" Language: English .\" .TH "PM\-POWERSAVE" "8" "Mar 5, 2007" "pm-powersave" "pm-utils User Manual" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pm-powersave \- Put your computer into low power mode .SH "SYNOPSIS" .HP \w'\fBpm\-powersave\fR\ 'u \fBpm\-powersave\fR [{\fBtrue\fR\ |\ \fBfalse\fR}] .SH "DESCRIPTION" .PP This manual page documents briefly the \fBpm\-powersave\fR command\&. .PP \fBpm\-powersave\fR can be used to set your system into low power mode\&. .SH "OPTIONS" .PP \fBtrue\fR .RS 4 Put the computer into low power mode to reduce energy consumption and extend your laptop\'s battery life\&. .RE .PP \fBfalse\fR .RS 4 Turn off low power mode\&. .RE .SH "FILES" .PP /etc/pm/power\&.d/, /usr/lib/pm\-utils/power\&.d/ .RS 4 When you run \fBpm\-powersave\fR it combines the scripts in these two directories and executes them in sorted order\&. If both directories contain a script with the same name, the one in /etc/pm/power\&.d/ has a higher precedence and only this one will be executed\&. .sp Therefore to disable a script from /usr/lib/pm\-utils/power\&.d/ simply create an empty file in /etc/pm/power\&.d/ with the same name and without the executable bit set\&. .RE .SH "SEE ALSO" .PP \fBpm-suspend\fR(8), \fBpm-hibernate\fR(8) .SH "AUTHOR" .PP \fBMichael Biebl\fR <\&biebl@debian\&.org\&> .RS 4 Manpage author\&. .RE .SH "COPYRIGHT" .br Copyright \(co 2007 Michael Biebl .br .PP This manual page was originally written for the Debian(TM) system, and has been adopted by the pm\-utils project\&. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation\&. .sp pm-utils-1.4.1/man/pm-action.80000644000175000017500000002651211414120302012735 00000000000000'\" t .\" Title: pm-action .\" Author: Tim Dijkstra .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: Apr 25, 2007 .\" Manual: pm-utils User Manual .\" Source: pm-action .\" Language: English .\" .TH "PM\-ACTION" "8" "Apr 25, 2007" "pm-action" "pm-utils User Manual" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pm-action \- Suspend or Hibernate your computer .SH "SYNOPSIS" .HP \w'\fBpm\-hibernate\fR\ 'u \fBpm\-hibernate\fR [\-\-help] .HP \w'\fBpm\-suspend\fR\ 'u \fBpm\-suspend\fR [\-\-quirk\-*] [\-\-help] .HP \w'\fBpm\-suspend\-hybrid\fR\ 'u \fBpm\-suspend\-hybrid\fR [\-\-quirk\-*] [\-\-help] .SH "DESCRIPTION" .PP This manual page documents briefly the \fBpm\-action\fR, \fBpm\-hibernate\fR, \fBpm\-suspend\fR and \fBpm\-suspend\-hybrid\fR commands\&. This manual page was originally written for the Debian(TM) distribution and has been adopted by the pm\-utils project\&. .PP These commands can be used to put the machine in a sleep state\&. The precise way how this is done can be influenced by installing executables and configuration snippets\&. For some options external programs are needed\&. .PP These commands will usually be called by \fBUPower\fR or \fBhald\fR when triggered to do so by a program in a desktop session such as \fBgnome\-power\-manager\fR\&. Calling them from the command line is also possible, but it is not guaranteed that all programs in your desktop session keep working as expected\&. .PP \fBpm\-suspend\fR .RS 4 During suspend most devices are shutdown, and system state is saved in RAM\&. The system still requires power in this state\&. Most modern systems require 3 to 5 seconds to enter and leave suspend, and most laptops can stay in suspend mode for 1 to 3 days before exhausting their battery\&. .RE .PP \fBpm\-hibernate\fR .RS 4 During hibernate the system is fully powered off, and system state is saved to disk\&. The system does not require power, and can stay in hibernate mode indefinitely\&. Most modern systems require 15 to 45 seconds to enter and leave hibernate, and entering and leaving hibernate takes longer when you have more memory\&. .RE .PP \fBpm\-suspend\-hybrid\fR .RS 4 Hybrid\-suspend is the process where the system does everything it needs to hibernate, but suspends instead of shutting down\&. This means that your computer can wake up quicker than for normal hibernation if you do not run out of power, and you can resume even if you run out of power\&. s2both(8) is an hybrid\-suspend implementation\&. .RE .SH "OPTIONS" .PP On some hardware putting the video card in the suspend state and recovering from it needs some special quirk handling\&. With the \-\-quirk\-* options of the \fBpm\-suspend\fR and \fBpm\-suspend\-hybrid\fR commands you can select which quirks should be used\&. .PP If \fBpm\-suspend\fR, \fBpm\-hibernate\fR, or \fBpm\-suspend\-hybrid\fR are invoked without any commandline parameters, they will try to grab the correct quirks from the internal quirk database\&. .PP \fB\-\-quirk\-dpms\-on\fR .RS 4 This option forces the video hardware to turn on the screen during resume\&. Most video adapters turn on the screen themselves, but if you get a blank screen on resume that can be turned back on by moving the mouse or typing then this option may be useful\&. .RE .PP \fB\-\-quirk\-dpms\-suspend\fR .RS 4 This option forces the video hardware to turn off the screen when suspending\&. Most video adapters seem to do this correctly, but some do not, which wastes lots of power\&. If your screen is still on after successfully suspending you may need to use this option\&. .RE .PP \fB\-\-quirk\-radeon\-off\fR .RS 4 This option forces Radeon hardware to turn off the display during suspend and turn it back on during resume\&. You only need to do this on some old ThinkPads of the \'30 series (T30, X31, R32,\&.\&.\&. ) with Radeon video hardware\&. .RE .PP \fB\-\-quirk\-s3\-bios\fR .RS 4 This option calls the video BIOS during S3 resume\&. Unfortunately, it is not always allowed to call the video BIOS at this point, so sometimes adding this option can actually break resume on some systems\&. .RE .PP \fB\-\-quirk\-s3\-mode\fR .RS 4 This option initializes the video card into a VGA text mode, and then uses the BIOS to set the video mode\&. On some systems S3 BIOS only initializes the video BIOS to text mode, and so both S3 BIOS and S3 MODE are needed\&. .RE .PP \fB\-\-quirk\-vbe\-post\fR .RS 4 This option will attempt to reinitialize the video card when resuming from suspend, using the same code the system BIOS uses at boot in order to initialize the video hardware\&. Not all video cards need this, and using this option on systems where it is not needed can cause a system to lock up when resuming\&. .RE .PP \fB\-\-quirk\-vbemode\-restore\fR .RS 4 This option will save and restore the current VESA mode which may be necessary to avoid X screen corruption\&. Using this feature on Intel graphics hardware is probably a bad idea\&. .RE .PP \fB\-\-quirk\-vbestate\-restore\fR .RS 4 This option saves and restores some low level hardware state which may be invalid after suspend\&. .RE .PP \fB\-\-quirk\-vga\-mode\-3\fR .RS 4 This option will try to force the video card into a standard text mode on resume\&. .RE .PP \fB\-\-quirk\-save\-pci\fR .RS 4 Save the PCI config space for the VGA card\&. .RE .PP \fB\-\-store\-quirks\-as\-lkw\fR .RS 4 Save the quirks the video adaptor required by \fBpm\-suspend\fR or \fBpm\-suspend\-hybrid\fR as an \&.quirkdb file that is specific to this system\&. The file will be saved in /etc/pm/last_known_working\&.quirkdb\&. This parameter will only save the actual quirks that were used to successfully suspend/resume a system, and will be specific to the exact configuration of that system, including the video hardware, video driver, and whether or not kernel modesetting was used\&. .RE .SH "FILES" .PP /etc/pm/config\&.d .RS 4 The files in this directory are evaluated in C sort order\&. These files can be provided by individual packages outside of pm\-utils\&. If a global configuration variable is set, the value set to will be appended to the previous value\&. If any other variable is set, it will be ignored\&. The syntax is simply: VAR_NAME=value\&. See the CONFIGURATION VARIABLES section for valid variables defined by pm\-utils\&. External packages can define others, see their respective documentation for more information\&. .RE .PP /etc/pm/sleep\&.d, /usr/lib/pm\-utils/sleep\&.d .RS 4 Programs in these directories (called hooks) are combined and executed in C sort order before suspend and hibernate with as argument \'suspend\' or \'hibernate\'\&. Afterwards they are called in reverse order with argument \'resume\' and \'thaw\' respectively\&. If both directories contain a similar named file, the one in /etc/pm/sleep\&.d will get preference\&. It is possible to disable a hook in the distribution directory by putting a non\-executable file in /etc/pm/sleep\&.d, or by adding it to the HOOK_BLACKLIST configuration variable\&. .RE .PP /var/log/pm\-suspend\&.log .RS 4 The log file shows what was done on the last suspend/hibernate and resume/thaw\&. .RE .SH "SLEEP HOOK ORDERING CONVENTION" .PP 00 \- 49 .RS 4 User and most package supplied hooks\&. If a hook assumes that all of the usual services and userspace infrastructure is still running, it should be here\&. .RE .PP 50 \- 74 .RS 4 Service handling hooks\&. Hooks that start or stop a service belong in this range\&. At or before 50, hooks can assume that all services are still enabled\&. .RE .PP 75 \- 89 .RS 4 Module and non\-core hardware handling\&. If a hook needs to load/unload a module, or if it needs to place non\-video hardware that would otherwise break suspend or hibernate into a safe state, it belongs in this range\&. At or before 75, hooks can assume all modules are still loaded\&. .RE .PP 90 \- 99 .RS 4 Reserved for critical suspend hooks\&. .RE .SH "CONFIGURATION VARIABLES" .PP Configuration variables defined by pm\-utils\&. These can be set in any file in /etc/pm/config\&.d/\&. .PP \fBSLEEP_MODULE [=kernel]\fR .RS 4 The default suspend backend to use\&. Valid values are: .PP \fIkernel\fR .RS 4 The built\-in kernel suspend/resume support\&. Use this if nothing else is supported on your system\&. The kernel backend is always used if nothing else is available\&. .RE .PP \fIuswsusp\fR .RS 4 If your system has support for the userspace suspend programs (s2ram/s2disk/s2both), then use this\&. .RE .PP \fItuxonice\fR .RS 4 If your system has support for tuxonice/suspend2, use this\&. .RE .sp .RE .PP \fBHIBERNATE_RESUME_POST_VIDEO [=no]\fR .RS 4 If video should be posted after hibernate, just like after suspend\&. You should not normally need to set this\&. .RE .PP \fBSUSPEND_MODULES\fR .RS 4 Space separated list of modules to unload before suspend\&. .RE .PP \fBHOOK_BLACKLIST\fR .RS 4 Space separated list of hooks that should be disabled\&. .RE .PP \fBHIBERNATE_MODE\fR .RS 4 Default method to power down the system when hibernating\&. If not set, the system will use the kernel default as a default value\&. Check /sys/power/disk for valid values\&. The default value will be surrounded by [square brackets]\&. .RE .PP \fBNEED_CLOCK_SYNC\fR .RS 4 If your system clock drifts across a suspend/resume or hibernate/thaw cycle, you should set this to true\&. This will cause pm\-utils to synchronize the system clock whenever going through a sleep/wake cycle at the expense of making suspend/resume take longer\&. .RE .PP \fBPM_HIBERNATE_DELAY [=900]\fR .RS 4 If you are using kernel suspend/resume and invoke \fBpm\-suspend\-hybrid\fR, this environment variable controls how many seconds the system will wait after going into suspend before waking back up and hibernating\&. By default, this is set to 900 seconds (15 minutes)\&. .RE .SH "RETURN VALUES" .PP Return values less than 128 mean that pm\-action failed before trying to put the system in the requested power saving state\&. A return value of 128 means that pm\-action tried to put the machine in the requested power state but failed\&. A return value greater than 128 means pm\-action encountered an error and also failed to enter the requested power saving state\&. .SH "DEBUGGING" .PP Debugging suspend/resume can be a tricky process, and is covered in more detail in /usr/share/doc/pm\-utils/README\&.debugging\&. .SH "BUGS" .PP The upstream BTS can be found at \m[blue]\fB\%https://bugs.freedesktop.org/\fR\m[]\&. Select \'pm\-utils\' as product\&. .SH "SEE ALSO" .PP \fBs2ram\fR(8), \fBs2disk\fR(8), \fBs2both\fR(8), \fBpm-is-supported\fR(1), \fBpm-powersave\fR(8), \fBvbetool\fR(8), \fBradeontool\fR(8) .SH "AUTHOR" .PP \fBTim Dijkstra\fR <\&tim@famdijkstra\&.org\&> .RS 4 Manpage author\&. .RE .SH "COPYRIGHT" .br Copyright \(co 2007 Tim Dijkstra .br .PP This manual page was originally written for the Debian(TM) system, and has been adopted by the pm\-utils project\&. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation\&. .sp pm-utils-1.4.1/src/0000755000175000017500000000000011414120571011053 500000000000000pm-utils-1.4.1/src/on_ac_power0000755000175000017500000000274211414116753013230 00000000000000#!/bin/sh # # Test if the computer is running on line power # Exit status: # - 0 (true) System is on AC power # - 1 (false) System is not on AC power # # NOTE: Batteries are not good indicators unless we also check their type, # as some peripherals have batteries. # # Copyright 2006 Red Hat, Inc. # Copyright 2006 Richard Hughes # # Based on work from: # Richard Hughes # Peter Jones # Stefan Seyfried # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # If we do not have any power supplies, assume we are on AC ret=0 # Iterate through power supplies sysfs knows about. for ps in /sys/class/power_supply/*; do [ -r "$ps/online" ] || continue # OK, we know we have an AC adaptor. # Our default return changes to failed. ret=1 read -r ps_status < "$ps/online" [ 1 -eq "$ps_status" ] && exit 0 done exit "$ret" pm-utils-1.4.1/src/Makefile.am0000644000175000017500000000164511414117645013045 00000000000000pm_libdir = $(libdir)/pm-utils pm_bindir = $(pm_libdir)/bin pm_sysconfdir = $(sysconfdir)/pm pm_bin_PROGRAMS = \ pm-pmu \ pm-reset-swap pm_pmu_SOURCES = pm-pmu.c pm_reset_swap_SOURCES = pm-reset-swap.c pm_bin_SCRIPTS = pm-action service bin_SCRIPTS = pm-is-supported dist_bin_SCRIPTS = on_ac_power sbin_SCRIPTS = pm-powersave script_in_files = pm-action.in pm-is-supported.in pm-powersave.in service CLEANFILES = $(script_in_files:.in=) EXTRA_DIST = $(script_in_files) do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_libdir),g' \ -e 's,[@]PM-UTILS-SYSCONFDIR[@],$(pm_sysconfdir),g' SUFFIXES = .in .in: $(do_subst) $< >$@ chmod +x $@ install-data-hook: -mkdir -p $(DESTDIR)$(sbindir) -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-hibernate -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend-hybrid clean-local : rm -f *~ pm-utils-1.4.1/src/Makefile.in0000644000175000017500000005453111414120262013045 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : pm_bin_PROGRAMS = pm-pmu$(EXEEXT) pm-reset-swap$(EXEEXT) subdir = src DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(pm_bindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pm_bindir)" \ "$(DESTDIR)$(sbindir)" PROGRAMS = $(pm_bin_PROGRAMS) am_pm_pmu_OBJECTS = pm-pmu.$(OBJEXT) pm_pmu_OBJECTS = $(am_pm_pmu_OBJECTS) pm_pmu_LDADD = $(LDADD) am_pm_reset_swap_OBJECTS = pm-reset-swap.$(OBJEXT) pm_reset_swap_OBJECTS = $(am_pm_reset_swap_OBJECTS) pm_reset_swap_LDADD = $(LDADD) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' SCRIPTS = $(bin_SCRIPTS) $(dist_bin_SCRIPTS) $(pm_bin_SCRIPTS) \ $(sbin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(pm_pmu_SOURCES) $(pm_reset_swap_SOURCES) DIST_SOURCES = $(pm_pmu_SOURCES) $(pm_reset_swap_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EXEEXT = @EXEEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pm_libdir = $(libdir)/pm-utils pm_bindir = $(pm_libdir)/bin pm_sysconfdir = $(sysconfdir)/pm pm_pmu_SOURCES = pm-pmu.c pm_reset_swap_SOURCES = pm-reset-swap.c pm_bin_SCRIPTS = pm-action service bin_SCRIPTS = pm-is-supported dist_bin_SCRIPTS = on_ac_power sbin_SCRIPTS = pm-powersave script_in_files = pm-action.in pm-is-supported.in pm-powersave.in service CLEANFILES = $(script_in_files:.in=) EXTRA_DIST = $(script_in_files) do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_libdir),g' \ -e 's,[@]PM-UTILS-SYSCONFDIR[@],$(pm_sysconfdir),g' SUFFIXES = .in all: all-am .SUFFIXES: .SUFFIXES: .in .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pm_binPROGRAMS: $(pm_bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(pm_bindir)" || $(MKDIR_P) "$(DESTDIR)$(pm_bindir)" @list='$(pm_bin_PROGRAMS)'; test -n "$(pm_bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pm_bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pm_bindir)$$dir" || exit $$?; \ } \ ; done uninstall-pm_binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pm_bin_PROGRAMS)'; test -n "$(pm_bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pm_bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pm_bindir)" && rm -f $$files clean-pm_binPROGRAMS: -test -z "$(pm_bin_PROGRAMS)" || rm -f $(pm_bin_PROGRAMS) pm-pmu$(EXEEXT): $(pm_pmu_OBJECTS) $(pm_pmu_DEPENDENCIES) @rm -f pm-pmu$(EXEEXT) $(LINK) $(pm_pmu_OBJECTS) $(pm_pmu_LDADD) $(LIBS) pm-reset-swap$(EXEEXT): $(pm_reset_swap_OBJECTS) $(pm_reset_swap_DEPENDENCIES) @rm -f pm-reset-swap$(EXEEXT) $(LINK) $(pm_reset_swap_OBJECTS) $(pm_reset_swap_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-dist_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files install-pm_binSCRIPTS: $(pm_bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(pm_bindir)" || $(MKDIR_P) "$(DESTDIR)$(pm_bindir)" @list='$(pm_bin_SCRIPTS)'; test -n "$(pm_bindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pm_bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pm_bindir)$$dir" || exit $$?; \ } \ ; done uninstall-pm_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(pm_bin_SCRIPTS)'; test -n "$(pm_bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pm_bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pm_bindir)" && rm -f $$files install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm-pmu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm-reset-swap.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(pm_bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pm_bindir)" "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local clean-pm_binPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pm_binPROGRAMS install-pm_binSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-dist_binSCRIPTS \ install-sbinSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dist_binSCRIPTS \ uninstall-pm_binPROGRAMS uninstall-pm_binSCRIPTS \ uninstall-sbinSCRIPTS .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-local clean-pm_binPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-data-hook install-dist_binSCRIPTS install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pm_binPROGRAMS \ install-pm_binSCRIPTS install-ps install-ps-am \ install-sbinSCRIPTS install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-dist_binSCRIPTS uninstall-pm_binPROGRAMS \ uninstall-pm_binSCRIPTS uninstall-sbinSCRIPTS .in: $(do_subst) $< >$@ chmod +x $@ install-data-hook: -mkdir -p $(DESTDIR)$(sbindir) -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-hibernate -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend-hybrid clean-local : rm -f *~ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pm-utils-1.4.1/src/pm-pmu.c0000644000175000017500000000517311414116753012367 00000000000000/* * suspend functions for machines with Mac-style pmu * * Copyright 2006 Red Hat, Inc. * * Based on work from: * Peter Jones * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #define _GNU_SOURCE 1 #include #include #include #include #include #include #include #include /* XXX this is a total hack for bad system headers. */ typedef u_int32_t __u32; #include #if !defined(PMU_IOC_CAN_SLEEP) || !defined(PMU_IOC_SLEEP) #error you must have working pmu kernel headers installed to build this program. #endif static int pmu_can_sleep(const int fd) { unsigned long arg = 0; if (ioctl(fd, PMU_IOC_CAN_SLEEP, &arg) < 0 || arg != 1) return 1; return 0; } static int pmu_sleep(const int fd) { unsigned long arg = 0; if (ioctl(fd, PMU_IOC_SLEEP, arg) < 0) return 1; return 0; } static inline int print_usage(FILE *output, int retval) { fprintf(output, "usage: pm-pmu --suspend | --check\n"); return retval; } int main(int argc, char *argv[]) { int task=0,fd=0,ret=0; if (argc != 2) return print_usage(stderr, 1); if (!strcmp(argv[1], "--help")) { task=1; } else if (!strcmp(argv[1],"--check")) { task=2; } else if (!strcmp(argv[1],"--suspend")) { task=3; } switch (task) { case 0: ret = print_usage(stderr, 1); break; case 1: ret = print_usage(stdout, 0); break; case 2: /* this is intentional */ case 3: if (access("/dev/pmu", W_OK)) { ret = 1; } else { if ((fd = open("/dev/pmu", O_RDWR)) < 0) { perror("open"); return 1; } ret = pmu_can_sleep(fd); if (!ret && task == 3) ret = pmu_sleep(fd); close(fd); } break; } return ret; } /* * vim:ts=8:sw=4:sts=4:et */ pm-utils-1.4.1/src/pm-reset-swap.c0000644000175000017500000001041211414116753013650 00000000000000/* * mark a swap device as not usable for thaw * * Copyright 2006 Red Hat, Inc. * * Authors: * Peter Jones * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #define _GNU_SOURCE 1 #include #include #include #include #include #include #include #include /* XXX this is a total hack for bad system headers. */ typedef u_int32_t __u32; #include typedef u_int64_t sector_t; /* * Here's what the disk looks like after a successful hibernate: 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000400 01 00 00 00 ff df 03 00 00 00 00 00 00 00 00 00 |................| 00000410 00 00 00 00 00 00 00 00 00 00 00 00 73 77 61 70 |............swap| 00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000fe0 00 00 00 00 01 00 00 00 00 00 00 00 53 57 41 50 |............SWAP| 00000ff0 53 50 41 43 45 32 53 31 53 55 53 50 45 4e 44 00 |SPACE2S1SUSPEND.| * And here's what it looks like if you haven't hibernated to it: 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000400 01 00 00 00 ff df 03 00 00 00 00 00 00 00 00 00 |................| 00000410 00 00 00 00 00 00 00 00 00 00 00 00 73 77 61 70 |............swap| 00000420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000ff0 00 00 00 00 00 00 53 57 41 50 53 50 41 43 45 32 |......SWAPSPACE2| * */ /* The signature offset is annoying. The struct is: * struct swsusp_header { * char reserved[PAGE_SIZE - 20 - sizeof(sector_t)]; * sector_t image; * char orig_sig[10]; * char sig[10]; * } */ off_t get_sig_offset(int orig) { int pagesize = sysconf(_SC_PAGESIZE); return (off_t)((sizeof (char) * pagesize) - (orig ? 20 : 10)); } static inline int print_usage(FILE *output, int retval) { fprintf(output, "usage: pm-reset-swap \n"); return retval; } int check_resume_block(FILE *dev, off_t offset) { char buf[11] = {0,}; off_t location = offset + get_sig_offset(0); if (fseek(dev, location, SEEK_SET) < 0) return -1; if (fread(buf, sizeof (char), 10, dev) != 10) return -1; if (!strncmp(buf, "S1SUSPEND", 9) || !strncmp(buf, "ULSUSPEND", 9)) return 1; return 0; } int clear_resume_block(FILE *dev, off_t offset) { char buf[21] = {0,}; off_t location = offset + get_sig_offset(1); if (fseek(dev, location, SEEK_SET) < 0) return -1; if (fread(buf, sizeof (char), 20, dev) != 20) return -1; if (fseek(dev, location, SEEK_SET) < 0) return -1; memmove(buf+10, buf, 10); memset(buf, '\0', 10); if (fwrite(buf, sizeof (char), 20, dev) != 20) return -1; return 0; } int main(int argc, char *argv[]) { FILE *dev = NULL; int rc; if (argc != 2) return print_usage(stderr, 1); if (!strcmp(argv[1], "--help")) { return print_usage(stdout, 0); } if (!(dev = fopen(argv[1], "r+b"))) { fprintf(stderr, "Could not open \"%s\": %m\n", argv[1]); return 1; } rc = check_resume_block(dev, 0); if (rc < 0) { fprintf(stderr, "Could not check \"%s\" for swap signature: %m\n", argv[1]); fclose(dev); return 2; } if (rc == 1) { if (clear_resume_block(dev, 0)) { fprintf(stderr, "Could not clear swap signature on \"%s\": %m\n", argv[1]); fclose(dev); return 1; } } fclose(dev); return 0; } /* * vim:ts=8:sw=4:sts=4:et */ pm-utils-1.4.1/src/pm-action.in0000755000175000017500000000552711414116753013235 00000000000000#!/bin/sh # vim: noexpandtab # Simple suspend script # # Copyright 2006 Red Hat, Inc. # # Based on work from: # Bill Nottingham # Peter Jones # David Zeuthen # Richard Hughes # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # The rule here? Simplicity. export STASHNAME=pm-suspend export METHOD="$(echo ${0##*pm-} |tr - _)" . "@PM-UTILS-LIBDIR@/pm-functions" # return code tracking for when suspend fails r=0 help() { echo "${0##*/} [options]" echo echo "Options can change how suspend or hibernate is done." run_hooks sleep help sleep_module_help exit 0 } if [ "$(id -u)" != "0" ]; then echo This utility may only be run by the root user. 1>&2 exit 1 fi remove_suspend_lock() { release_lock "${STASHNAME}.lock" } try_lock "${STASHNAME}.lock" || exit 1 # make sure we release the lock no matter how we exit trap remove_suspend_lock 0 # clean up from the last run rm -rf "${STORAGEDIR}" mkdir -p "${STORAGEDIR}" # save our parameter list. [ -f "$PARAMETERS" ] || echo '' >"$PARAMETERS" add_parameters $PM_CMDLINE update_parameters while [ $# -gt 0 ] do [ "$1" = "--help" ] && help shift done command_exists "check_$METHOD" && command_exists "do_$METHOD" || { log "pm-utils does not know how to $METHOD on this system." exit 1 } "check_$METHOD" || { log "This system does not support $METHOD as a sleep method." exit 1 } case "$METHOD" in suspend*) ACTION=suspend; REVERSE=resume ;; hibernate) ACTION=hibernate; REVERSE=thaw ;; *) echo "Cannot happen. Please file a bug against pm-utils." exit 1 ;; esac init_logfile "${PM_LOGFILE}" log "Initial commandline parameters: $PM_CMDLINE" load_hook_blacklist load_hook_parameters # run the sleep hooks log "$(date): Running hooks for $ACTION." if run_hooks sleep "$ACTION $METHOD"; then # Sleep only if we know how and if a hook did not inhibit us. log "$(date): performing $METHOD" sync "do_$METHOD" || r=128 log "$(date): Awake." else log "$(date): Inhibit found, will not perform $METHOD" fi log "$(date): Running hooks for $REVERSE" # run the sleep hooks in reverse with the wakeup action if run_hooks sleep "$REVERSE $METHOD" reverse; then log "$(date): Finished." else exit $((r+1)) fi exit $r pm-utils-1.4.1/src/pm-is-supported.in0000644000175000017500000000172511414116753014407 00000000000000#!/bin/sh # # Copyright 2007 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # . "@PM-UTILS-LIBDIR@/pm-functions" help_options() { echo "pm-is-supported [--suspend | --hibernate | --suspend-hybrid ]" echo } ARG="$(echo ${1#--}|tr - _)" case "$ARG" in suspend|hibernate|suspend_hybrid) "check_$ARG" ;; help) help_options ;; *) help_options 1>&2 exit 1 ;; esac pm-utils-1.4.1/src/pm-powersave.in0000644000175000017500000000413211414117645013760 00000000000000#!/bin/sh # vim:noexpandtab # Simple powersave script # # Copyright 2006 Red Hat, Inc. # # Based on work from: # Bill Nottingham # Peter Jones # David Zeuthen # Richard Hughes # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # export STASHNAME=pm-powersave . "@PM-UTILS-LIBDIR@/pm-functions" remove_powersave_lock() { release_lock "${STASHNAME}.lock" } help() { cat <