tremove redundant I/O - libdevuansdk - common library for devuan's simple distro kits
git clone https://git.parazyd.org/libdevuansdk
Log
Files
Refs
Submodules
README
LICENSE
---
commit af6960725d34b4a9a1e37a9955555b69f41eda93
parent 55637ebfb49f0fd7c9c96d9f011e18723b442650
Author: parazyd 
Date:   Wed, 12 Oct 2016 13:58:47 +0200

remove redundant I/O

Diffstat:
  M zlibs/bootstrap                     |      29 ++++++++++++++---------------

1 file changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/zlibs/bootstrap b/zlibs/bootstrap
t@@ -60,10 +60,6 @@ bootstrap_complete_base() {
         conf_print_resolvconf     | sudo tee $strapdir/etc/resolv.conf
         conf_print_sourceslist    | sudo tee $strapdir/etc/apt/sources.list
 
-        ## below typically used in arm-sdk
-        [[ -n $inittab ]] && { print $inittab | sudo tee -a $strapdir/etc/inittab }
-        for i in $custmodules;do print $i | sudo tee -a $strapdir/etc/modules; done
-
         ## write third-stage for chroot
         bootstrap_config_thirdstage | sudo tee $strapdir/thirdstage
         bootstrap_config_cleanup    | sudo tee $strapdir/cleanup
t@@ -84,7 +80,8 @@ bootstrap_complete_base() {
         sleep 1
         devprocsys umount $strapdir || zerr
 
-        bootstrap_tar_pack || zerr
+        bootstrap_tar_pack             || zerr
+        bootstrap_tar_unpack $strapdir || zerr
 }
 
 bootstrap_config_cleanup() {
t@@ -133,11 +130,12 @@ bootstrap_tar_pack() {
         req=(bootstrap_tgz)
         ckreq || return 1
 
-        for i in $custmodules;do sudo sed -i -e 's/$i//' $strapdir/etc/modules;done
+        #for i in $custmodules;do sudo sed -i -e '/'$i'/d' $strapdir/etc/modules;done
+        #[[ -n $inittab ]] && sudo sed -i -e '/'$inittab'/d' $strapdir/etc/inittab
 
         cat <