| 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(-)
--- |
| 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 < |