From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6470830831546925056 X-Received: by 10.28.1.146 with SMTP id 140mr187767wmb.2.1506607707425; Thu, 28 Sep 2017 07:08:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.160.247 with SMTP id n52ls1198569wrn.6.gmail; Thu, 28 Sep 2017 07:08:27 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD7UTXPfTxM2lT5YR+9qpV5Uuno/7pqyptmNFzVK81Snm3PtgYeSB35AaQCZ1LHxYkG7UA6 X-Received: by 10.223.155.203 with SMTP id e11mr161257wrc.3.1506607707077; Thu, 28 Sep 2017 07:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506607707; cv=none; d=google.com; s=arc-20160816; b=hntYEfpZIBO8HL5hwlYJlg7w5cINeJ5t+TOZtqWzccqGvM6/1u2gQrRDV45qzK05F4 dvITkfjHFKhYeD5WtyvGk5eACscEUZjOfGbXg0QhSrsKDtLBJOuasxOjD4IRvtw7qJ4K +WNn20jHnNSgghm2SLhBhZfw6Zis70Vy5Ux8tztSe3Ccr80SdYSGhvknVcPHr3R5eHES 9nH0vG4g3OmP2edUpgF1YDoi0mv5Wm36FGs7t5rJX/eB5mvfjfghD4g/cIJBA5D/4BlV Z2r1QEod46fjRYYF54PLNa3B5ZY+sLezE+CDO9+rJLfWNFPr+p8EedqkmX751Oe2f1oE +K9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=wMVAY579PgCDtqqYr1cAQyd3d6Gx2y3+liHFKXhwEhE=; b=NRFKNnSJD/GkVIAchaCEy+QnHasOGPCCM+4M7qFlOoC/q1INieW3AgVvHJDXlf13yN SJ1fxEb7oe5uIQxMoyUjKOgdr9GsuKgmyGcpMCm03ChFxJQEaQGW3nX8AbkZfK0rhznV 8E48aVEeoFd87fC384bPnD9nyd0MNhnZ90/+qZXr1eGvRgOPLgSlsqBCUxGMYv8rVqIG o7ycEG3MP0lfBcr4nG6EAYMOYrYaPbnjxGen1jgBnq+knACPR2ok1N553AxCgk2xpH0J 3l85xWa8ITsqRglhQsCyJvVaNteJsjrKyPS1RqE33fp6mNFTnJ0PKz7Lvhx07hiq8d4v jSBQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id p200si129135wmg.4.2017.09.28.07.08.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2017 07:08:27 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v8SE8QsL011422 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 28 Sep 2017 16:08:26 +0200 Received: from md1em3qc.ww002.siemens.net ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v8SE8Q71017195; Thu, 28 Sep 2017 16:08:26 +0200 From: Henning Schild To: isar-users@googlegroups.com Cc: Henning Schild Subject: [PATCH] image: configscript: no need to change /etc/inittab on systemd Date: Thu, 28 Sep 2017 16:08:24 +0200 Message-Id: <20170928140824.27003-1-henning.schild@siemens.com> X-Mailer: git-send-email 2.13.6 X-TUID: q2jPAO7QQKYC Make the manipulation of /etc/inittab depend on the existance of that file. Newer distros do not have that file anymore. Signed-off-by: Henning Schild --- meta-isar/recipes-core/images/files/debian-configscript.sh | 7 +++++-- meta-isar/recipes-core/images/files/raspbian-configscript.sh | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/meta-isar/recipes-core/images/files/debian-configscript.sh b/meta-isar/recipes-core/images/files/debian-configscript.sh index 31a20d2..698277c 100644 --- a/meta-isar/recipes-core/images/files/debian-configscript.sh +++ b/meta-isar/recipes-core/images/files/debian-configscript.sh @@ -69,8 +69,11 @@ if [ ! -e /dev/console ]; then mknod /dev/console c 5 1 fi -# Enable tty -echo "T0:23:respawn:/sbin/getty -L $MACHINE_SERIAL $BAUDRATE_TTY vt100" >> /etc/inittab +# Enable tty conditionally, systemd does not have the file but its own magic +if [ -f /etc/inittab ]; then + echo "T0:23:respawn:/sbin/getty -L $MACHINE_SERIAL $BAUDRATE_TTY vt100" \ + >> /etc/inittab +fi # Undo setup script changes if [ -x "$TARGET/sbin/start-stop-daemon.REAL" ]; then diff --git a/meta-isar/recipes-core/images/files/raspbian-configscript.sh b/meta-isar/recipes-core/images/files/raspbian-configscript.sh index 5eacb3b..61a1aa5 100644 --- a/meta-isar/recipes-core/images/files/raspbian-configscript.sh +++ b/meta-isar/recipes-core/images/files/raspbian-configscript.sh @@ -68,9 +68,11 @@ devtmpfs /dev devtmpfs mode=0755,nosuid 0 0 # End /etc/fstab EOF -# Enable tty -echo "T0:23:respawn:/sbin/getty -L $MACHINE_SERIAL $BAUDRATE_TTY vt100" \ - >> /etc/inittab +# Enable tty conditionally, systemd does not have the file but its own magic +if [ -f /etc/inittab ]; then + echo "T0:23:respawn:/sbin/getty -L $MACHINE_SERIAL $BAUDRATE_TTY vt100" \ + >> /etc/inittab +fi # Undo setup script changes if [ -x "$TARGET/sbin/start-stop-daemon.REAL" ]; then -- 2.13.6