1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Author: Jamie Strandboge <jdstrand@ubuntu.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.36.1/src/ufw-init
===================================================================
--- ufw-0.36.1.orig/src/ufw-init
+++ ufw-0.36.1/src/ufw-init
@@ -31,6 +31,12 @@ if [ "$1" = "--datadir" ] && [ -n "$2" ]
fi
export DATA_DIR="$datadir"
+# Debian/Ubuntu: small boot speed improvement
+. "${rootdir}#CONFIG_PREFIX#/ufw/ufw.conf"
+if [ "$1" = "start" ] && [ "$2" = "quiet" ] && [ "$ENABLED" = "no" ]; then
+ exit 0
+fi
+
if [ -s "${rootdir}#STATE_PREFIX#/ufw-init-functions" ]; then
. "${rootdir}#STATE_PREFIX#/ufw-init-functions"
else
|