diff --recursive --new-file --unified --exclude=.svn --exclude=.git /ram/gitcmp/libdebian-installer/0.35/svn/d-i.c /ram/gitcmp/libdebian-installer/0.35/git/d-i.c
--- /ram/gitcmp/libdebian-installer/0.35/svn/d-i.c	1970-01-01 01:00:00.000000000 +0100
+++ /ram/gitcmp/libdebian-installer/0.35/git/d-i.c	2009-08-06 23:21:20.346659910 +0200
@@ -0,0 +1,88 @@
+/* 
+   d-i.c - common utilities for debian-installer
+   Author - David Whedon
+
+   Copyright (C) 2000-2001  David Whedon <dwhedon@debian.org>
+   
+   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
+   
+*/
+
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <syslog.h>
+#include "d-i.h"
+
+
+#ifdef L__di_execlog__
+/* di_execlog():
+   execute the command, log the result
+   */
+
+int
+di_execlog (const char *incmd)
+{
+  FILE *output;
+  char cmd[strlen (incmd) + 6];
+  char line[MAXLINE];
+  strcpy (cmd, incmd);
+
+  openlog ("installer", LOG_PID | LOG_PERROR, LOG_USER);
+  syslog (LOG_DEBUG, "running cmd '%s'", cmd);
+
+  /* FIXME: this can cause the shell command if there's redirection
+     already in the passed string */
+  strcat (cmd, " 2>&1");
+  output = popen (cmd, "r");
+  while (fgets (line, MAXLINE, output) != NULL)
+    {
+      syslog (LOG_DEBUG, line);
+    }
+  closelog ();
+  /* FIXME we aren't getting the return value from the actual command
+     executed, not sure how to do that cleanly */
+  return (pclose (output));
+}
+#endif /* L__di_execlog__ */
+
+#ifdef L__di_log__
+
+void
+di_log(char *msg){
+    openlog ("installer", LOG_PID | LOG_PERROR, LOG_USER);
+    syslog (LOG_DEBUG, "%s", msg);
+    closelog ();
+}
+
+#endif /* L__di_log__ */
+
+
+#ifdef L__di_check_dir__
+int
+di_check_dir (const char *dirname)
+{
+  struct stat check;
+  if (stat (dirname, &check) == -1)
+    return -1;
+  else
+    return S_ISDIR (check.st_mode);
+}
+
+#endif /*  L__di_check_dir__ */
diff --recursive --new-file --unified --exclude=.svn --exclude=.git /ram/gitcmp/libdebian-installer/0.35/svn/d-i.h /ram/gitcmp/libdebian-installer/0.35/git/d-i.h
--- /ram/gitcmp/libdebian-installer/0.35/svn/d-i.h	1970-01-01 01:00:00.000000000 +0100
+++ /ram/gitcmp/libdebian-installer/0.35/git/d-i.h	2009-08-06 23:21:20.346659910 +0200
@@ -0,0 +1,10 @@
+/* 
+   d-i.h - common utilities for debian-installer
+*/
+
+#define MAXLINE 512
+
+int di_execlog (const char *incmd);
+void di_log(char *msg);
+int di_check_dir (const char *dirname);
+
