From patchwork Fri Aug 26 09:52:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Korsgaard X-Patchwork-Id: 663042 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sLGYf1WYJz9sBg for ; Fri, 26 Aug 2016 19:52:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=hu74123A; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 527698D4A2; Fri, 26 Aug 2016 09:52:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bddW+v1r3QtW; Fri, 26 Aug 2016 09:52:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 79A6D8D365; Fri, 26 Aug 2016 09:52:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7D6F41C22CF for ; Fri, 26 Aug 2016 09:52:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7DF208D365 for ; Fri, 26 Aug 2016 09:52:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FSZwSg5Gc47Y for ; Fri, 26 Aug 2016 09:52:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7302B8D34B for ; Fri, 26 Aug 2016 09:52:27 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id o80so10669871wme.0 for ; Fri, 26 Aug 2016 02:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=OqmwIOO/ERwCe/NsWNIkn+ZXKt5Tw27Lo057OMtGc8Y=; b=hu74123Azz5OziNeWGE/r2cIGeGhWFegkbCZJT1QNLpX5ViddLUI33ejM0wwJpXnoH JWzcrjpWH1jBxo25ViqklQx2lDeZPBaR/mWbIcpualkmjefjvKJTU5pqQApzCq8m4rJv D3TWNZxhCMUBuiKEkef/4ZPtdsdQmdQ6VRrO7RzWS1QnYZo8poBmCkjCV2K7/CTAGoTD eJFdhykry4Hyyofj6KStWzUyxTJON97OFwnv8ze17vnzVak6r91BxWB6ryuNcPcjRNFV 3scOmRr1SoB+CZWKyXbbCDhjCIa5ETA1ameROzlK9jDia8OtXilU/Q0FJj3HWWjPrEy6 2kNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=OqmwIOO/ERwCe/NsWNIkn+ZXKt5Tw27Lo057OMtGc8Y=; b=g3wsmbT/+b0/lejIUjRQtWVZKW480ZLyN7VNzdZqbnIC/F45jd7foAYY2Lq9KDL8Ig wbRSq/bw2daPd7Wz9tC5UJ9e/0b6MoBNWGyCsov7lbMB3OYK3VdaAKD47CPRkgoeuSlO 6zQbj6xdbhjnZy4sgIG0+Tr2egN/y1jWLsMAx6Tv+rFi1GdrKSbgdmKPlc0NgN3QI+nm H4iFuLYwFbVnB4kMrH+H7RdW7fNhORqlulBj43eQJssOuOlUSGytv7kGOCR41BaXBQaJ Yk3Q8jWOWQKrw0C6xszSZKqvrIWuuqS/gIMlRTyzG7CFm+2tVau8YA+OALwxlkSJ/41e p7cA== X-Gm-Message-State: AE9vXwMS3dwIPnZN5O3TKK2/VnfbrTocJDIvOANt6Nt/n/z8a5QtxFDns7FUfKd/1I4k6g== X-Received: by 10.28.13.143 with SMTP id 137mr2923473wmn.46.1472205145957; Fri, 26 Aug 2016 02:52:25 -0700 (PDT) Received: from dell.be.48ers.dk ([91.183.172.93]) by smtp.gmail.com with ESMTPSA id cw7sm19207300wjb.38.2016.08.26.02.52.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Aug 2016 02:52:25 -0700 (PDT) Received: from peko by dell.be.48ers.dk with local (Exim 4.84) (envelope-from ) id 1bdDoG-0000Ch-MJ; Fri, 26 Aug 2016 11:52:24 +0200 From: Peter Korsgaard To: buildroot@buildroot.org Date: Fri, 26 Aug 2016 11:52:20 +0200 Message-Id: <1472205140-739-2-git-send-email-peter@korsgaard.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1472205140-739-1-git-send-email-peter@korsgaard.com> References: <1472205140-739-1-git-send-email-peter@korsgaard.com> Subject: [Buildroot] [PATCH 2/2] board/raspberrypi/post-build.sh: only tweak /etc/inittab if available X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" As pointed out in bug #9161, we don't always have an inittab file (if systemd or no init is used), so the post build script should only try to tweak it if present. Signed-off-by: Peter Korsgaard --- board/raspberrypi/post-build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/raspberrypi/post-build.sh b/board/raspberrypi/post-build.sh index 7eae14a..5e5eb71 100755 --- a/board/raspberrypi/post-build.sh +++ b/board/raspberrypi/post-build.sh @@ -4,6 +4,8 @@ set -u set -e # Add a console on tty1 -grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ -sed -i '/GENERIC_SERIAL/a\ +if [ -e ${TARGET_DIR}/etc/inittab ]; then + grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ + sed -i '/GENERIC_SERIAL/a\ tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab +fi