fix regex that identifies which device to attempt to mount for removable
authorAaron Klingaman <alk@cs.princeton.edu>
Fri, 29 Jul 2005 15:53:14 +0000 (15:53 +0000)
committerAaron Klingaman <alk@cs.princeton.edu>
Fri, 29 Jul 2005 15:53:14 +0000 (15:53 +0000)
devices during configuration file searching. before, it was returned
the base device name (ie sda) as a possible device to mount. it should only
return <device>[0-9]+$

source/configuration
source/steps/ReadNodeConfiguration.py

index 816ce39..8df9bd2 100644 (file)
@@ -4,7 +4,7 @@
 
 
 # the current version of the bootmanager
-VERSION=3.1.5
+VERSION=3.1.6
 
 
 # full url to which api server to contact
index 45eb10e..b4a8e90 100644 (file)
@@ -237,7 +237,7 @@ def Run( vars, log ):
 
             partitions= file("/proc/partitions", "r")
             for line in partitions:
-                if not re.search("%s[0-9]*$" % device, line):
+                if not re.search("%s[0-9]+$" % device, line):
                     continue
 
                 try:
@@ -247,6 +247,7 @@ def Run( vars, log ):
                     # ok, try to mount it and see if we have a conf file.
                     full_device= "/dev/%s" % parts[3]
                 except IndexError, e:
+                    log.write( "Incorrect /proc/partitions line:\n%s\n" % line )
                     continue
 
                 log.write( "Mounting %s on %s\n" % (full_device,mount_point) )
@@ -254,6 +255,7 @@ def Run( vars, log ):
                     utils.sysexec( "mount -o ro -t ext2,msdos %s %s" \
                                    % (full_device,mount_point), log )
                 except BootManagerException, e:
+                    log.write( "Unable to mount, trying next partition\n" )
                     continue
 
                 conf_file_path= "%s/%s" % (mount_point,NEW_CONF_FILE_NAME)