=== modified file 'includes/bootstrap.inc'
--- includes/bootstrap.inc	2009-05-12 18:08:42 +0000
+++ includes/bootstrap.inc	2009-05-21 16:27:20 +0000
@@ -1449,6 +1449,9 @@ function _drupal_bootstrap($phase) {
  * @see _drupal_maintenance_theme()
  */
 function drupal_maintenance_theme() {
+  foreach (module_invoke_all('maintenance_files') as $file) {
+    require_once DRUPAL_ROOT . '/' . $file;
+  }
   require_once DRUPAL_ROOT . '/includes/theme.maintenance.inc';
   _drupal_maintenance_theme();
 }

=== modified file 'modules/system/system.api.php'
--- modules/system/system.api.php	2009-05-20 19:56:36 +0000
+++ modules/system/system.api.php	2009-05-21 17:39:08 +0000
@@ -1697,5 +1697,13 @@ function hook_disable() {
 }
 
 /**
+ * Provide a list of files to be incldude during maintenance mode.
+ *
+ * Do not use drupal_get_path as it is not likely to be available.
+ */
+function hook_maintenance_files() {
+  return array(dirname(drupal_get_filenae('module', 'system')) . '/system.admin.inc');
+}
+/**
  * @} End of "addtogroup hooks".
  */

=== modified file 'modules/system/system.module'
--- modules/system/system.module	2009-05-16 18:34:22 +0000
+++ modules/system/system.module	2009-05-21 17:41:20 +0000
@@ -2339,3 +2339,11 @@ function system_image_toolkits() {
     ),
   );
 }
+
+/**
+ * Implementation of hook_maintenance_files().
+ */
+function system_maintenance_files() {
+  // theme_status_report needs to be made available.
+  return array(dirname(drupal_get_filenae('module', 'system')) . '/system.admin.inc');
+}

