Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | Author: Jamie Strandboge <jamie@canonical.com> |
| 2 | Description: to improve boot speed when disabled, don't source all of |
| 3 | ufw-init-functions (which also sources in other files). |
| 4 | |
| 5 | Upstream-Status: Inappropriate [ not author ] |
| 6 | |
| 7 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> |
| 8 | |
| 9 | Index: 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 |