Index: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in	(revision 79)
+++ trunk/Makefile.in	(revision 80)
@@ -4,5 +4,5 @@
 #
 # SVN INFO:
-#      $Id: Makefile.in 1657 2006-12-06 13:32:47Z bas $
+#      $Id$
 #
 #
@@ -16,4 +16,9 @@
 
 PYTHON_FILES=pxeconfig
+
+all: compile
+
+compile:
+	echo "done compiling"
 
 install: install-conf
Index: trunk/configure.in
===================================================================
--- trunk/configure.in	(revision 79)
+++ trunk/configure.in	(revision 80)
@@ -3,5 +3,5 @@
 # Desc. : Simple configure script for email2trac package
 # SVN INFO:
-#	$Id: configure.in 1314 2006-09-29 07:27:12Z bas $
+#	$Id$
 #
 #
@@ -59,3 +59,4 @@
         Makefile
 	pxeconfig
+	pxeconfigd
 	)
Index: trunk/pxeconfigd
===================================================================
--- trunk/pxeconfigd	(revision 79)
+++ 	(revision )
@@ -1,156 +1,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2002
-#
-# This file is part of the pxeconfig utils
-#
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
-#
-# SVN info
-#  $Id$
-"""
-Author: Bas van der Vlies <basv@sara.nl>
-Date  : 12 February 2002
-Desc. : This script is used to control how a node is booted with PXE
-        enabled network cards. The node boots and fetch a pxe
-        config file which tells how the node must boot. This daemon
-        enables a client to remove his/here pxe config file. With the
-	next boot it will use the default one.
-
-	command line option:
-	  -d/--directory <dir>
-	    Where <dir> is the directory where the pxe config files reside.
-	  -V/--version 
-	    Prints the version number and exits
-          
-        Note:
-          This server can ONLY be started from inetd.
-"""
-import time
-import socket
-import sys
-import os
-import string
-import syslog
-import getopt
-
-# DEBUG
-#
-DEBUG=1
-
-# Some Global Constants
-#
-BUFSIZE=4096
-STDIN=0
-STDOUT=1
-SHORTOPT_LIST='Vd:'
-LONGOPT_LIST=['version', 'directory=']
-
-PXE_CONF_DIR = '/tftpboot/pxelinux.cfg'
-VERSION = '0.4.4'
-
-# Give the current time
-#
-def now():
-    return time.ctime(time.time())
-
-
-def remove_link(filename):
-  """This removes the pxe config filename for the host that is connected:
-      filename : string
-  """
-
-  file = os.path.join(PXE_CONF_DIR, filename)
-
-  if DEBUG:
-    print 'file = %s' %file
-
-  if not os.path.exists(file): return
-
-  if os.path.islink(file): 
-    try:
-      os.unlink(file)
-      syslog.openlog("pxeconfigd")
-      syslog.syslog(syslog.LOG_INFO, file)
-      syslog.closelog()
-    except OSError:
-      err_msg = "No permission at directory: %s" %PXE_CONF_DIR
-      os.write(STDOUT, err_msg)
-      sys.exit(1)
-
-# This function handles the client connection. It closes
-# the connection if there is no data
-#
-def handleConnection():
-  """Determines which host connects to the server
-  """
-
-  # Determine client address
-  # 
-  try:
-    client_addr = socket.fromfd(sys.stdin.fileno(), socket.AF_INET, 
-                          socket.SOCK_STREAM)
-    client_ip = client_addr.getpeername()[0] 
-
-  except socket.error, detail:
-    print "pxeconfigd can only be started from inetd!!!"
-    sys.exit(1)
-
-
-  # translate ip address ---> hex address
-  #
-  d = string.split(client_ip, '.')
-  client_haddr = '%02X%02X%02X%02X' %(int(d[0]), int(d[1]), int(d[2]), int(d[3]))
-
-  if DEBUG:
-    print 'ip = %s, hex = %s' %(client_ip, client_haddr)
-
-  remove_link(client_haddr)
-  sys.exit(0)
-
-def check_args(argv):
-  """
-  Must we use another directory for the PXE configuration
-  """
-  global PXE_CONF_DIR
-
-  try:
-    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
-  except getopt.error, detail:
-    print __doc__
-    print detail
-    sys.exit(1)
-
-  for opt, value in opts:
-
-    if opt in ['-d', '--directory']:
-      if not os.path.isdir(value):
-        os.write(STDOUT, "PXE booting is not configured")
-        sys.exit(1)
-      else:
-        PXE_CONF_DIR = value
-
-    elif opt in ['-V', '--version']:
-      print VERSION
-      sys.exit(0)
-
-def server():
-  """Start the daemon
-  """
-  check_args(sys.argv)
-  handleConnection()
-
-if __name__ == '__main__':
-  server()
Index: trunk/pxeconfigd.in
===================================================================
--- trunk/pxeconfigd.in	(revision 80)
+++ trunk/pxeconfigd.in	(revision 80)
@@ -0,0 +1,156 @@
+#!@PYTHON@
+#
+# Copyright (C) 2002
+#
+# This file is part of the pxeconfig utils
+#
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
+#
+# SVN info
+#  $Id$
+"""
+Author: Bas van der Vlies <basv@sara.nl>
+Date  : 12 February 2002
+Desc. : This script is used to control how a node is booted with PXE
+        enabled network cards. The node boots and fetch a pxe
+        config file which tells how the node must boot. This daemon
+        enables a client to remove his/here pxe config file. With the
+	next boot it will use the default one.
+
+	command line option:
+	  -d/--directory <dir>
+	    Where <dir> is the directory where the pxe config files reside.
+	  -V/--version 
+	    Prints the version number and exits
+          
+        Note:
+          This server can ONLY be started from inetd.
+"""
+import time
+import socket
+import sys
+import os
+import string
+import syslog
+import getopt
+
+# DEBUG
+#
+DEBUG=1
+
+# Some Global Constants
+#
+BUFSIZE=4096
+STDIN=0
+STDOUT=1
+SHORTOPT_LIST='Vd:'
+LONGOPT_LIST=['version', 'directory=']
+
+PXE_CONF_DIR = '/tftpboot/pxelinux.cfg'
+VERSION = '0.4.4'
+
+# Give the current time
+#
+def now():
+    return time.ctime(time.time())
+
+
+def remove_link(filename):
+  """This removes the pxe config filename for the host that is connected:
+      filename : string
+  """
+
+  file = os.path.join(PXE_CONF_DIR, filename)
+
+  if DEBUG:
+    print 'file = %s' %file
+
+  if not os.path.exists(file): return
+
+  if os.path.islink(file): 
+    try:
+      os.unlink(file)
+      syslog.openlog("pxeconfigd")
+      syslog.syslog(syslog.LOG_INFO, file)
+      syslog.closelog()
+    except OSError:
+      err_msg = "No permission at directory: %s" %PXE_CONF_DIR
+      os.write(STDOUT, err_msg)
+      sys.exit(1)
+
+# This function handles the client connection. It closes
+# the connection if there is no data
+#
+def handleConnection():
+  """Determines which host connects to the server
+  """
+
+  # Determine client address
+  # 
+  try:
+    client_addr = socket.fromfd(sys.stdin.fileno(), socket.AF_INET, 
+                          socket.SOCK_STREAM)
+    client_ip = client_addr.getpeername()[0] 
+
+  except socket.error, detail:
+    print "pxeconfigd can only be started from inetd!!!"
+    sys.exit(1)
+
+
+  # translate ip address ---> hex address
+  #
+  d = string.split(client_ip, '.')
+  client_haddr = '%02X%02X%02X%02X' %(int(d[0]), int(d[1]), int(d[2]), int(d[3]))
+
+  if DEBUG:
+    print 'ip = %s, hex = %s' %(client_ip, client_haddr)
+
+  remove_link(client_haddr)
+  sys.exit(0)
+
+def check_args(argv):
+  """
+  Must we use another directory for the PXE configuration
+  """
+  global PXE_CONF_DIR
+
+  try:
+    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
+  except getopt.error, detail:
+    print __doc__
+    print detail
+    sys.exit(1)
+
+  for opt, value in opts:
+
+    if opt in ['-d', '--directory']:
+      if not os.path.isdir(value):
+        os.write(STDOUT, "PXE booting is not configured")
+        sys.exit(1)
+      else:
+        PXE_CONF_DIR = value
+
+    elif opt in ['-V', '--version']:
+      print VERSION
+      sys.exit(0)
+
+def server():
+  """Start the daemon
+  """
+  check_args(sys.argv)
+  handleConnection()
+
+if __name__ == '__main__':
+  server()
