X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id D0EEFDC00C9 for ; Wed, 12 Feb 2014 06:09:45 +0000 (UTC) Received: by mail-la0-f50.google.com with SMTP id ec20so6585160lab.23 for ; Tue, 11 Feb 2014 22:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=RqaC+DPV5SnbDGO88Dojtl3MhGxflDg/FnUkldELjIw=; b=ad3Pxr47SFTfOV9LyDUW5HPNG7angD9yzJKgWJDer8pyu7Ss49PQ46Ay+FdHomNRFZ bPPi8HVCZrAH9eG7IhW7iXKpXTox6nkCtqK2FWuuZSAAf3QSQbsElIRVDxJrMQvyEF+1 ryM/cmOCMOcWPlkNAjuk6UWXQm751YUQrYpiDf/uGwlFZ1/Vvjp4E4gGmbhnsAhjCDSx XuX5zEbNAh5zWP7n4s3fQSX0QLgxCMzz+0dH2pLeEGytwMjQY4K6/EZ82Jl2Xme6jaHJ py1yNwhpQkbTzEIDhkew2cY9QmW/WdAywqJI8H4x2rOQ++5IU5/cQrhhLOkos6sTvSd3 nShA== X-Received: by 10.112.63.193 with SMTP id i1mr244258lbs.54.1392185380167; Tue, 11 Feb 2014 22:09:40 -0800 (PST) Received: from vostro ([2001:1bc8:101:f402:21c:23ff:fefc:bf0b]) by mx.google.com with ESMTPSA id yq2sm31597767lab.3.2014.02.11.22.09.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2014 22:09:40 -0800 (PST) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Date: Wed, 12 Feb 2014 08:10:21 +0200 From: Timo Teras To: IT Offshore Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] Main/mkinitfs - small Patch for LUKS / Cryptsetup Message-ID: <20140212081021.24b9d693@vostro> In-Reply-To: <1392158622-21396-1-git-send-email-developer@it-offshore.co.uk> References: <1392158622-21396-1-git-send-email-developer@it-offshore.co.uk> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.20; i486-alpine-linux-uclibc) 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 Tue, 11 Feb 2014 22:43:42 +0000 IT Offshore wrote: > small patch to run "apk fix linux-grsec" if /etc/crypttab contains > "luks" > > This will prevent unbootable encrypted systems after kernel upgrades. > --- > main/mkinitfs/mkinitfs.trigger | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/main/mkinitfs/mkinitfs.trigger > b/main/mkinitfs/mkinitfs.trigger index cedf363..644c534 100644 > --- a/main/mkinitfs/mkinitfs.trigger > +++ b/main/mkinitfs/mkinitfs.trigger > @@ -1,5 +1,14 @@ > #!/bin/sh > > +NORMAL="\033[1;0m" > +STRONG="\033[1;1m" > +GREEN="\033[1;32m" > + > +print_green() { > + local prompt="${GREEN}${STRONG}$1 ${NORMAL}" > + printf "${prompt} %s\n" > +} > + > for i in "$@"; do > # get last element in path > flavor=${i##*/} > @@ -29,5 +38,11 @@ for i in /boot/initramfs-[0-9]*; do > fi > done > > +# rebuild initramfs for Cryptsetup / LUKS > +if grep luks /etc/crypttab 1>/dev/null; then > + print_green "Rebuilding Initramfs for LVM / Cryptsetup" > + apk fix linux-grsec > +fi You should still not call 'apk' from apk script. Could you explain what is the exact situation when mkinitfs.trigger does not regen the initramfs, but it should. You should add that to the monitoring list of the trigger script in APKBUILD, and make the detection for that in the trigger script's first "for" loop where it regens the initramfs images. --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---