diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
index b15d91e..9891b5f 100644
--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/DirectoryWatcher.java
@@ -99,9 +99,6 @@
     // Represents artifacts that could not be installed
     Map/* <File, Artifact> */ installationFailures = new HashMap/* <File, Artifact> */();
 
-    // Represents artifacts that could not be installed
-    Set/* <Bundle> */ startupFailures = new HashSet/* <Bundle> */();
-    
     public DirectoryWatcher(Dictionary properties, BundleContext context)
     {
         super(properties.toString());
@@ -298,12 +295,9 @@
 
                 if (startBundles)
                 {
-                    // Try to start all the bundles that we could not start last time.
-                    // Make a copy, because start() changes the underlying collection
-                    start(new HashSet(startupFailures));
-		            // Start updated bundles.
-		            start(updatedBundles);
-                    // Start newly installed bundles
+                    // Try to start all the bundles that are not persistently stopped
+                    startAllBundles();
+                    // Try to start newly installed bundles
                     start(installedBundles);
                 }
 
@@ -729,7 +723,6 @@
                 }
                 bundle.uninstall();
             }
-            startupFailures.remove(bundle);
             log("Uninstalled " + path, null);
         }
         catch (Exception e)
@@ -773,7 +766,6 @@
                     in.close();
                 }
             }
-            startupFailures.remove(bundle);
             artifact.setLastModified(Util.getLastModified(path));
             log("Updated " + path, null);
         }
@@ -784,6 +776,28 @@
         return bundle;
     }
 
+    private void startAllBundles()
+    {
+        List bundles = new ArrayList();
+        for (Iterator it = currentManagedArtifacts.values().iterator(); it.hasNext();)
+        {
+            Artifact artifact = (Artifact) it.next();
+            if (artifact.getBundleId() > 0)
+            {
+                Bundle bundle = context.getBundle(artifact.getBundleId());
+                if (bundle != null)
+                {
+                    if (bundle.getState() != Bundle.STARTING && bundle.getState() != Bundle.ACTIVE
+                            && FileInstall.getStartLevel().isBundlePersistentlyStarted(bundle))
+                    {
+                        bundles.add(bundle);
+                    }
+                }
+            }
+        }
+        start(bundles);
+    }
+
     private void start(Collection/* <Bundle> */ bundles)
     {
         for (Iterator b = bundles.iterator(); b.hasNext(); )
@@ -803,13 +817,11 @@
             try
             {
                 bundle.start();
-                startupFailures.remove(bundle);
                 log("Started bundle: " + bundle.getLocation(), null);
             }
             catch (BundleException e)
             {
                 log("Error while starting bundle: " + bundle.getLocation(), e);
-                startupFailures.add(bundle);
             }
         }
     }
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
index e17216d..0a8ee82 100644
--- a/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
+++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/FileInstall.java
@@ -39,6 +39,7 @@
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.service.startlevel.StartLevel;
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
@@ -50,6 +51,7 @@
 public class FileInstall implements BundleActivator, ManagedServiceFactory
 {
     static ServiceTracker padmin;
+    static ServiceTracker startLevel;
     static ServiceTracker cmTracker;
     static List /* <ArtifactListener> */ listeners = new ArrayList /* <ArtifactListener> */();
     BundleContext context;
@@ -68,6 +70,8 @@
 
         padmin = new ServiceTracker(context, PackageAdmin.class.getName(), null);
         padmin.open();
+        startLevel = new ServiceTracker(context, StartLevel.class.getName(), null);
+        startLevel.open();
         cmTracker = new ServiceTracker(context, ConfigurationAdmin.class.getName(), null)
         {
             public Object addingService(ServiceReference serviceReference)
@@ -216,6 +220,24 @@
         }
     }
 
+    static StartLevel getStartLevel()
+    {
+        return getStartLevel(10000);
+    }
+
+    static StartLevel getStartLevel(long timeout)
+    {
+        try
+        {
+            return (StartLevel) startLevel.waitForService(timeout);
+        }
+        catch (InterruptedException e)
+        {
+            Thread.currentThread().interrupt();
+            return null;
+        }
+    }
+
     static ConfigurationAdmin getConfigurationAdmin()
     {
         return getConfigurationAdmin(10000);
