On Fri, Feb 15, 2008 at 07:25:16PM -0600, Victor Lowther wrote:
> On Fri, Feb 15, 2008 at 06:36:14PM +0000, Richard Hughes wrote:
> > On Fri, 2008-02-15 at 19:10 +0100, Michael Biebl wrote:
> > > We could write to the log file which hooks failed and
> > > which succeeded, etc.
> > 
> > Not a bad idea IMO.
> 
> It is a good idea.  I will code up functionality to implement it.

Patch for quick & simple status checking:

diff --git a/pm/functions.in b/pm/functions.in
index 36559fb..e4a4b12 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -137,9 +137,9 @@ run_hooks() {
                        hook="$phooks/$base"
                fi
                [ -x "${hook}" ] && (
+                       printf "%s: running %s %s\t" "$(date)" "${hook}" "$2"
                        IFS="${oifs}"
-                       echo "$(date): running ${hook} $2"
-                       "${hook}" $2
+                       "${hook}" $2 && echo "...suceeded." || echo "...failed."
                )
        done
        IFS="${oifs}"
  
> > Richard.
> > 
> > 
> 
> -- 
> Victor Lowther
> Ubuntu Certified Professional

-- 
Victor Lowther
Ubuntu Certified Professional
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to