Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame^] | 1 | From 92fcdbc1a57086e4decc1597217c0739dc16342a Mon Sep 17 00:00:00 2001 |
| 2 | From: Silcet <camorga1@gmail.com> |
| 3 | Date: Tue, 27 Apr 2021 05:34:59 +0000 |
| 4 | Subject: [PATCH] Author: Jamie Strandboge <jamie@canonical.com> |
| 5 | Description: |
| 6 | to improve boot speed when disabled, don't source all of ufw-init-functions |
| 7 | (which also sources in other files). |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 8 | |
| 9 | Upstream-Status: Inappropriate [ not author ] |
| 10 | |
| 11 | Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> |
| 12 | |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame^] | 13 | The patch was imported from the OpenEmbedded git server |
| 14 | (git://git.openembedded.org/openembedded) as of commit id |
| 15 | 2cc1bd9dd060f5002c2fde7aacba86fe230c12af. |
| 16 | |
| 17 | Signed-off-by: Silcet <camorga1@gmail.com> |
| 18 | --- |
| 19 | src/ufw-init | 6 ++++++ |
| 20 | 1 file changed, 6 insertions(+) |
| 21 | |
| 22 | diff --git a/src/ufw-init b/src/ufw-init |
| 23 | index 3505a02..dde37f0 100755 |
| 24 | --- a/src/ufw-init |
| 25 | +++ b/src/ufw-init |
| 26 | @@ -31,6 +31,12 @@ if [ "$1" = "--datadir" ] && [ -s "$2" ]; then |
| 27 | fi |
| 28 | export DATA_DIR="$datadir" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 29 | |
| 30 | +# Debian/Ubuntu: small boot speed improvement |
| 31 | +. "#CONFIG_PREFIX#/ufw/ufw.conf" |
| 32 | +if [ "$1" = "start" ] && [ "$2" = "quiet" ] && [ "$ENABLED" = "no" ]; then |
| 33 | + exit 0 |
| 34 | +fi |
| 35 | + |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame^] | 36 | if [ -s "${rootdir}#STATE_PREFIX#/ufw-init-functions" ]; then |
| 37 | . "${rootdir}#STATE_PREFIX#/ufw-init-functions" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 38 | else |