- conf_file= file(conf_file_path,"r")
- conf_file_contents= conf_file.read()
- conf_file.close()
- except IOError, e:
- pass
-
- utils.sysexec_noerr( "umount %s" % full_device, log )
- if __parse_configuration_file( vars, log, conf_file_contents):
- return 1
- else:
- raise BootManagerException("Found configuration file plnode.txt " \
- "on floppy, but was unable to parse it.")
-
+ # major minor #blocks name
+ parts= string.split(line)
+
+ # ok, try to mount it and see if we have a conf file.
+ full_device= "/dev/%s" % parts[3]
+ except IndexError, e:
+ continue
+
+ try:
+ utils.sysexec( "mount -o ro -t ext2,msdos %s %s" \
+ % (full_device,mount_point), log )
+ except BootManagerException, e:
+ continue
+
+ conf_file_path= "%s/%s" % (mount_point,NEW_CONF_FILE_NAME)
+ if os.access( conf_file_path, os.R_OK ):
+ try:
+ conf_file= file(conf_file_path,"r")
+ conf_file_contents= conf_file.read()
+ conf_file.close()
+ except IOError, e:
+ pass
+
+ utils.sysexec_noerr( "umount %s" % mount_point, log )
+ if __parse_configuration_file( vars, log, conf_file_contents):
+ return 1
+ else:
+ raise BootManagerException("Found configuration file plnode.txt " \
+ "on floppy, but was unable to parse it.")
+