From 1ec3c83b7045016dda42c643c9d8ab91ba16d18b Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Sat, 16 Jun 2012 16:29:22 +0800 Subject: [PATCH] nanonotefiles: make inittab work with minimal config system --- nanonote-files/base-files/usr/bin/login.nn | 13 +++++++++++++ nanonote-files/files/etc/inittab | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 nanonote-files/base-files/usr/bin/login.nn diff --git a/nanonote-files/base-files/usr/bin/login.nn b/nanonote-files/base-files/usr/bin/login.nn new file mode 100755 index 0000000..fb3f2df --- /dev/null +++ b/nanonote-files/base-files/usr/bin/login.nn @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -f /usr/bin/gmenu2x ]; then + exec /usr/bin/gmenu2x +fi + +if [ -f /bin/ash ]; then + exec /bin/ash --login +fi + +if [ -f /bin/bash ]; then + exec /bin/sh --login +fi diff --git a/nanonote-files/files/etc/inittab b/nanonote-files/files/etc/inittab index cb1da0f..bc060d7 100644 --- a/nanonote-files/files/etc/inittab +++ b/nanonote-files/files/etc/inittab @@ -2,7 +2,7 @@ ::shutdown:/etc/init.d/rcS K stop tts/0::askfirst:/bin/ash --login ttyS0::askfirst:/bin/ash --login -tty1::respawn:/usr/bin/gmenu2x +tty1::respawn:/usr/bin/login.nn tty2::askfirst:/bin/ash --login tty3::askfirst:/bin/ash --login tty4::askfirst:/bin/ash --login