X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from ncopa-desktop.alpinelinux.org (3.203.202.84.customer.cdi.no [84.202.203.3]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nc@alpinelinux.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id 2C993DC0138; Thu, 2 May 2013 13:04:32 +0000 (UTC) Date: Thu, 2 May 2013 15:04:29 +0200 From: Natanael Copa To: Hugo Landau Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] mkinitfs - Modified init script for network boot Message-ID: <20130502150429.4659719c@ncopa-desktop.alpinelinux.org> In-Reply-To: <5166B278.4030201@devever.net> References: <1365640410-11357-1-git-send-email-hlandau@devever.net> <5166B278.4030201@devever.net> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-unknown-linux-gnu) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 11 Apr 2013 13:54:16 +0100 Hugo Landau wrote: > initramfs-init.in | 166 > ++++++++++++++++++++++++++++++++++++++++++++++++------ > 1 file changed, 148 insertions(+), 18 deletions(-) > This patch was applied already. I am taking a close look and are cleaning up somethings. I have a few questions. > fi > -else > +fi > +if [ -f "$sysroot/etc/.default_boot_services" -o ! -f "$ovl" ]; then > # add some boot services by default > rc_add devfs sysinit > rc_add dmesg sysinit > @@ -525,6 +641,8 @@ else > rc_add mount-ro shutdown > rc_add killprocs shutdown > rc_add savecache shutdown > + > + rm -f "$sysroot/etc/.default_boot_services" > fi Why is the above hunk needed? Why do we need the /etc/.default_boot_services? > if [ -f $sysroot/etc/fstab ]; then > @@ -570,7 +688,16 @@ ebegin "Installing packages to root filesystem" > if [ "$KOPT_chart" = yes ]; then > pkgs="$pkgs acct" > fi > -apkflags="--initdb --progress --force --no-network" > + > +apkflags="--initdb --progress --force" > +if [ -z "$ALPINE_REPO" ]; then > + apkflags="$apkflags --no-network" > +else > + # HTTP: convince apk to behave > + apk add --root $sysroot $repo_opt $apkflags > + apk update --root $sysroot $repo_opt > +fi Why do you need to run an extra apk add there? I suspect it was added to create the initial db. Does it work if we instead do: if [ -z "$ALPINE_REPO" ]; then apkflags="$apkflags --no-network" else apkflags="$apkflags --update-cache" fi The --update-cache/-U option will make apk run 'update' before 'add'. -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---