From dean@arctic.org Sat Nov 25 23:36:14 2006
Date: Sat, 25 Nov 2006 23:36:14 -0800 (PST)
From: dean gaudet <dean@arctic.org>
To: bugs@ucarp.org
Subject: [patch] log exec errors

my first boneheaded error trying to use ucarp was to forget to set execute 
permissions on my scripts... this patch logs exec errors to hopefully save 
someone else some time in diagnosing a similar boneheaded error.

thanks
-dean

Index: ucarp-1.2/src/spawn.c
===================================================================
--- ucarp-1.2.orig/src/spawn.c	2006-11-25 23:32:54.000000000 -0800
+++ ucarp-1.2/src/spawn.c	2006-11-25 23:33:28.000000000 -0800
@@ -21,6 +21,7 @@
     if (pid == (pid_t) 0) {
         (void) close(dev_desc_fd);
         execl(script, script, interface, (char *) NULL);
+	logfile(LOG_ERR, _("Unable to exec %s %s: %s"), script, interface, strerror(errno));
         _exit(EXIT_FAILURE);
     } else if (pid != (pid_t) -1) {
         logfile(LOG_WARNING, _("Spawning [%s %s]"), script, interface);
