Package: ufw / 0.33-2

0001-optimize-boot.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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).

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