[ONOS-8121][VOL-3259] Fixing null filter for felix fileinstall

Change-Id: Ib5ef99002ad1d0a40e767528223e324326f2c022
(cherry picked from commit cf3284174edba18f921995fe01fb0e5f802caf7e)
diff --git a/tools/package/onos-prep-karaf b/tools/package/onos-prep-karaf
index c1986b3..23b456b 100755
--- a/tools/package/onos-prep-karaf
+++ b/tools/package/onos-prep-karaf
@@ -33,6 +33,10 @@
 perl -pi.old -e "s/maxFileSize=1MB/maxFileSize=10MB/g" \
     $KARAF_DIR/etc/org.ops4j.pax.logging.cfg
 
+# Patch the fileinstall to avoid NPE when filter is null
+echo "felix.fileinstall.filter=*.jar" >> \
+    $KARAF_DIR/etc/org.apache.felix.fileinstall-deploy.cfg
+
 # Patch-in proper Karaf version into the startup script
 sed -i.bk "s/apache-karaf-\$KARAF_VERSION/$KARAF_DIR/g" $SANDBOX/bin/onos-service