From 61383326709839760c018ffeba2cd6aa0c7996b7 Mon Sep 17 00:00:00 2001 From: Aaron Klingaman Date: Fri, 29 Jul 2005 15:53:14 +0000 Subject: [PATCH] fix regex that identifies which device to attempt to mount for removable 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 [0-9]+$ --- source/configuration | 2 +- source/steps/ReadNodeConfiguration.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/configuration b/source/configuration index 816ce39..8df9bd2 100644 --- a/source/configuration +++ b/source/configuration @@ -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 diff --git a/source/steps/ReadNodeConfiguration.py b/source/steps/ReadNodeConfiguration.py index 45eb10e..b4a8e90 100644 --- a/source/steps/ReadNodeConfiguration.py +++ b/source/steps/ReadNodeConfiguration.py @@ -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) -- 2.43.0