blob: a1e56b7cac07e6367c5963ff685862f35a609ee3 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001Author: Jamie Strandboge <jamie@canonical.com>
2Description: to improve boot speed when disabled, don't source all of
3 ufw-init-functions (which also sources in other files).
4
5Upstream-Status: Inappropriate [ not author ]
6
7Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
8
9Index: ufw-0.31/src/ufw-init
10===================================================================
11--- ufw-0.31.orig/src/ufw-init 2012-03-09 17:07:11.000000000 -0600
12+++ ufw-0.31/src/ufw-init 2012-03-17 09:37:51.000000000 -0500
13@@ -18,6 +18,12 @@
14 #
15 set -e
16
17+# Debian/Ubuntu: small boot speed improvement
18+. "#CONFIG_PREFIX#/ufw/ufw.conf"
19+if [ "$1" = "start" ] && [ "$2" = "quiet" ] && [ "$ENABLED" = "no" ]; then
20+ exit 0
21+fi
22+
23 if [ -s "#STATE_PREFIX#/ufw-init-functions" ]; then
24 . "#STATE_PREFIX#/ufw-init-functions"
25 else