[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Added do_without_error function, and squelch the error from mkdir when trying



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID a12bd9e8fdf8bb647c6834a441f81d88b6adccc5
# Parent  1aaa1abab953bddedaa5009e326fef7fceac56db
Added do_without_error function, and squelch the error from mkdir when trying
to create the lock directory.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 1aaa1abab953 -r a12bd9e8fdf8 tools/examples/xen-hotplug-common.sh
--- a/tools/examples/xen-hotplug-common.sh      Fri Dec  9 10:49:29 2005
+++ b/tools/examples/xen-hotplug-common.sh      Fri Dec  9 10:50:26 2005
@@ -44,6 +44,10 @@
 
 do_or_die() {
   "$@" || fatal "$@ failed"
+}
+
+do_without_error() {
+  "$@" 2>/dev/null || log debug "$@ failed"
 }
 
 sigerr() {
@@ -121,7 +125,7 @@
 
   while [ $retries -lt $LOCK_RETRIES ]
   do
-    mkdir "$lockdir" && trap "release_lock $1; sigerr" ERR &&
+    mkdir "$lockdir" 2>/dev/null && trap "release_lock $1; sigerr" ERR &&
       _update_lock_info "$lockdir" && return
 
     local new_owner=$(_lock_owner "$lockdir")

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.