Index: trunk/pxeconfig/AUTHORS
===================================================================
--- trunk/pxeconfig/AUTHORS	(revision 3)
+++ trunk/pxeconfig/AUTHORS	(revision 3)
@@ -0,0 +1,7 @@
+pxeconfig and pxeconfigd
+========================
+Bas van der Vlies <basv@sara.nl>
+
+hexls.py
+========================
+Walter de Jong <walter@sara.nl>
Index: trunk/pxeconfig/LICENSE.SARA
===================================================================
--- trunk/pxeconfig/LICENSE.SARA	(revision 3)
+++ trunk/pxeconfig/LICENSE.SARA	(revision 3)
@@ -0,0 +1,27 @@
+/*
+ * This release is maintained by:
+ *      Bas van der Vlies <basv@sara.nl>
+ *      Walter de Jong < walter@sara.nl>
+ *
+ * Copyright (C) 2000, SARA.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for non-commercial purposes and without fee is hereby
+ * granted, provided that the above copyright notice appears in all copies
+ * and that both the copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * Neither SARA (Stichting Academisch Rekencentrum Amsterdam) nor the
+ * nor the author make any representations about the suitability of this
+ * software for any purpose. This software is provided ``as is'' without
+ * express or implied warranty.
+ *
+ */
+********************************************************************        
+*                                                                  *        
+*  Bas van der Vlies                     e-mail: basv@sara.nl      *        
+*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *        
+*  Kruislaan 415                         fax:    +31 20 6683167    *        
+*  1098 SJ Amsterdam                     WWW:    www.sara.nl       *        
+*                                                                  *        
+********************************************************************      
Index: trunk/pxeconfig/README
===================================================================
--- trunk/pxeconfig/README	(revision 3)
+++ trunk/pxeconfig/README	(revision 3)
@@ -0,0 +1,48 @@
+PXE-utilities
+-------------
+
+These is a release of the SARA utilities that we use to boot our nodes with
+PXE network cards. This was developed because we always want to use the
+PXE network card as our first boot device. With pxelinux which is derivative
+of syslinux you can specify how the node must boot by a configuration
+file. This configuration is placed in, eg '/tftpboot/pxelinux.cfg' directory.
+
+In our setup we have a default setup. The default setup is to boot from
+harddisk. When node boots it fetches the default configuraion file and the
+configuration file tells the node to boot from the harddisk. This setup
+is used for nodes that have already been installed by systemimager.
+
+At SARA we have developed a strategy how to install a fresh node.
+
+ 1) The ip-address in our setup is known for the new node. So
+    we make a link in the '/tftpboot/pxelinux.cfg' directory to a 
+    pxe config file which tells that it has to fetch the kernel en 
+    root filesystem from our bootserver, eg:
+         0A000A02 ---> default.node_install (10.0.10.2)
+
+ 2) The client starts and  uses the systemimager software to install
+    the node. The last line of installation script connects to a
+    daemon on the bootserver. This daemon will remove the PXE config file
+    for this node.
+
+ 3) The node reboots and will use the default pxe config file which will
+    instruct the node to boot from harddisk.
+
+This release contains the following utilities:
+
+  pxeconfigd)
+     This is daemon that removes the pxe configuration file of a node.
+
+  pxeconfig)
+     With this interactive program we can specify which pxe config file
+     a node or nodes must use. This utility will create the links
+     in '/tftpboot/pxelinux.cfg'
+
+  hexls)
+      Is a utility that diplays a directory and if in this directory
+      contains HEX files it will convert them to IP-numbers.
+
+All this utilities are written in Python. 
+
+
+Bas van der Vlies
Index: trunk/pxeconfig/changelog
===================================================================
--- trunk/pxeconfig/changelog	(revision 2)
+++ trunk/pxeconfig/changelog	(revision 3)
@@ -1,6 +1,15 @@
 Always edit this file when changes are commited:
 
+
+
 $Log: changelog,v $
-Revision 1.1  2002/02/18 15:02:00  sscpbas
-Initial revision
+Revision 1.2  2002/02/19 09:38:10  sscpbas
+Added command line option to specifiy where the pxe config directory resides.
+This is for client ans server side.
 
+Added some info about the package such as a READMEE, AUTHORS and LICENSE.SARA
+file.
+
+Revision 1.1.1.1  2002/02/18 15:02:00  sscpbas
+Initial release
+
Index: trunk/pxeconfig/hexls
===================================================================
--- trunk/pxeconfig/hexls	(revision 3)
+++ trunk/pxeconfig/hexls	(revision 3)
@@ -0,0 +1,45 @@
+#! /usr/bin/env python
+'''
+hexls.py - Lists directory contents, but converts the hexadecimal IP numbers
+to dotted decimal notation (so you can at least see what you're doing..!!)
+
+Author: Walter de Jong <walter@sara.nl>
+Date:   January 2002
+
+CVS info 
+  $Date: 2002/02/19 09:38:10 $ 
+  $Revision: 1.1 $
+'''
+
+import os
+import string
+import re
+
+def hexls(path):
+	'''list directory, convert hexadecimal to dotted decimal'''
+
+	regexp = re.compile('[' + string.hexdigits + ']+')
+	for f in os.listdir(path):
+		if regexp.match(f) and len(f) == 8:
+			digit1 = string.atoi(f[:2], 16)
+			digit2 = string.atoi(f[2:4], 16)
+			digit3 = string.atoi(f[4:6], 16)
+			digit4 = string.atoi(f[6:], 16)
+
+			print '%s => %d.%d.%d.%d' % (f, digit1, digit2, digit3, digit4)
+		else:
+			if f[0] != '.':
+				print f
+
+
+if __name__ == '__main__':
+	import sys
+
+	if len(sys.argv) > 1:
+		for dir in sys.argv[1:]:
+			hexls(dir)
+	else:
+		hexls('.')
+
+# EOB
+
Index: trunk/pxeconfig/hexls.py
===================================================================
--- trunk/pxeconfig/hexls.py	(revision 2)
+++ 	(revision )
@@ -1,45 +1,0 @@
-#! /usr/bin/env python
-'''
-hexls.py - Lists directory contents, but converts the hexadecimal IP numbers
-to dotted decimal notation (so you can at least see what you're doing..!!)
-
-Author: Walter de Jong <walter@sara.nl>
-Date:   January 2002
-
-CVS info 
-  $Date: 2002/02/18 15:02:00 $ 
-  $Revision: 1.1 $
-'''
-
-import os
-import string
-import re
-
-def hexls(path):
-	'''list directory, convert hexadecimal to dotted decimal'''
-
-	regexp = re.compile('[' + string.hexdigits + ']+')
-	for f in os.listdir(path):
-		if regexp.match(f) and len(f) == 8:
-			digit1 = string.atoi(f[:2], 16)
-			digit2 = string.atoi(f[2:4], 16)
-			digit3 = string.atoi(f[4:6], 16)
-			digit4 = string.atoi(f[6:], 16)
-
-			print '%s => %d.%d.%d.%d' % (f, digit1, digit2, digit3, digit4)
-		else:
-			if f[0] != '.':
-				print f
-
-
-if __name__ == '__main__':
-	import sys
-
-	if len(sys.argv) > 1:
-		for dir in sys.argv[1:]:
-			hexls(dir)
-	else:
-		hexls('.')
-
-# EOB
-
Index: trunk/pxeconfig/pxeconfig
===================================================================
--- trunk/pxeconfig/pxeconfig	(revision 2)
+++ trunk/pxeconfig/pxeconfig	(revision 3)
@@ -7,6 +7,6 @@
 #
 # CVS info
-#  $Date: 2002/02/18 15:02:00 $
-#  $Revision: 1.1 $
+#  $Date: 2002/02/19 09:38:10 $
+#  $Revision: 1.2 $
 #
 """
@@ -34,4 +34,5 @@
 import os
 import glob
+import getopt
 
 # DEBUG
@@ -46,4 +47,6 @@
 START=2
 END=3
+SHORTOPT_LIST='d:'
+LONGOPT_LIST=['directory=']
 
 def choice_pxe_configfile():
@@ -176,5 +179,20 @@
     create_links(iptable[net])
 
+def check_args(argv):
+  """
+  Must we use another directory for the PXE configuration
+  """
+  try:
+    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
+  except getopt.error, detail:
+    print __doc__
+    print detail
+    sys.exit(1)
+
+  if opts:
+    opt, PXE_CONFIG_DIR = opts[0]
+
 def main():
+  check_args(sys.argv)
   interactive()
 
Index: trunk/pxeconfig/pxeconfigd
===================================================================
--- trunk/pxeconfig/pxeconfigd	(revision 2)
+++ trunk/pxeconfig/pxeconfigd	(revision 3)
@@ -4,8 +4,12 @@
 Date  : 12 February 2002
 Desc. : This script is used to control how a node is booted with PXE
-        enabled network cards. The PC boots starts and fetch a pxe
-        config file which tells how the PC must boot. This daemon
-        enables a client to remove his pxe-config file. It then uses
-        the DEFAULT one. 
+        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.
           
         Note:
@@ -13,6 +17,6 @@
 
 CVS info
-  $Date: 2002/02/18 15:02:00 $
-  $Revision: 1.1 $
+  $Date: 2002/02/19 09:38:10 $
+  $Revision: 1.2 $
 """
 import time
@@ -22,4 +26,5 @@
 import string
 import syslog
+import getopt
 
 # DEBUG
@@ -32,4 +37,6 @@
 STDIN=0
 STDOUT=1
+SHORTOPT_LIST='d:'
+LONGOPT_LIST=['directory=']
 
 PXE_CONF_DIR = '/tftpboot/pxelinux.cfg'
@@ -94,8 +101,26 @@
   sys.exit(0)
 
+def check_args(argv):
+  """
+  Must we use another directory for the PXE configuration
+  """
+  try:
+    opts, args = getopt.getopt(argv[1:], SHORTOPT_LIST, LONGOPT_LIST)
+  except getopt.error, detail:
+    print __doc__
+    print detail
+    sys.exit(1)
+
+  if opts:
+    opt, PXE_CONFIG_DIR = opts[0]
+
+  
+  
+
 
 def server():
   """Start the daemon
   """
+  check_args(sys.argv)
 
   if not os.path.isdir(PXE_CONF_DIR):
