* [PATCH] image: configscript: no need to change /etc/inittab on systemd
@ 2017-09-28 14:08 Henning Schild
2017-10-05 13:04 ` Alexander Smirnov
0 siblings, 1 reply; 2+ messages in thread
From: Henning Schild @ 2017-09-28 14:08 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
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 <henning.schild@siemens.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] image: configscript: no need to change /etc/inittab on systemd
2017-09-28 14:08 [PATCH] image: configscript: no need to change /etc/inittab on systemd Henning Schild
@ 2017-10-05 13:04 ` Alexander Smirnov
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Smirnov @ 2017-10-05 13:04 UTC (permalink / raw)
To: Henning Schild, isar-users
> Make the manipulation of /etc/inittab depend on the existance of that
> file. Newer distros do not have that file anymore.
Applied to next, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-05 13:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28 14:08 [PATCH] image: configscript: no need to change /etc/inittab on systemd Henning Schild
2017-10-05 13:04 ` Alexander Smirnov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox