aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch
blob: a1e56b7cac07e6367c5963ff685862f35a609ee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Author: Jamie Strandboge <jamie@canonical.com>
Description: to improve boot speed when disabled, don't source all of
 ufw-init-functions (which also sources in other files).

Upstream-Status: Inappropriate [ not author ]

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>

Index: ufw-0.31/src/ufw-init
===================================================================
--- ufw-0.31.orig/src/ufw-init	2012-03-09 17:07:11.000000000 -0600
+++ ufw-0.31/src/ufw-init	2012-03-17 09:37:51.000000000 -0500
@@ -18,6 +18,12 @@
 #
 set -e
 
+# Debian/Ubuntu: small boot speed improvement
+. "#CONFIG_PREFIX#/ufw/ufw.conf"
+if [ "$1" = "start" ] && [ "$2" = "quiet" ] && [ "$ENABLED" = "no" ]; then
+    exit 0
+fi
+
 if [ -s "#STATE_PREFIX#/ufw-init-functions" ]; then
     . "#STATE_PREFIX#/ufw-init-functions"
 else