[PATCH] vars.sh: remove unnecessary fork to speedup boot/upgrades

Trek trek00 at inbox.ru
Mon Aug 31 19:21:50 BST 2020


On synthetic tests (starting init-d-script with DAEMON=/bin/true),
it is near 9% faster when running with FANCYTTY=0.
---
 debian/vars.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/vars.sh b/debian/vars.sh
index f0280fed..1b1f2019 100644
--- a/debian/vars.sh
+++ b/debian/vars.sh
@@ -25,7 +25,8 @@ unset RAMLOCK
 
 # Parse kernel command line
 if [ -r /proc/cmdline ]; then
-    for ARG in $(cat /proc/cmdline); do
+    read -r cmdline </proc/cmdline
+    for ARG in $cmdline; do
         case $ARG in
 
             # check for bootoption 'noswap' and do not activate swap
-- 
2.20.1




More information about the Debian-init-diversity mailing list