diff options
author | John Crispin <blogic@openwrt.org> | 2016-04-18 21:53:07 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2016-04-18 21:53:07 +0200 |
commit | dc929174095a00150de6a3e48d46355d24f223b9 (patch) | |
tree | f1106ba7c0d71f8072e5158c481f71aeee8db066 | |
parent | 5e85ae9e4c85e9ec43f38aa350c5bd0f0e7bea2b (diff) | |
download | upstream-dc929174095a00150de6a3e48d46355d24f223b9.tar.gz upstream-dc929174095a00150de6a3e48d46355d24f223b9.tar.bz2 upstream-dc929174095a00150de6a3e48d46355d24f223b9.zip |
image / basefiles: make console password configurable
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: John Crispin <john@phrozen.org>
22 files changed, 48 insertions, 42 deletions
diff --git a/package/base-files/files/etc/config/system b/package/base-files/files/etc/config/system index 20517f9a53..80c3f9b0a8 100644 --- a/package/base-files/files/etc/config/system +++ b/package/base-files/files/etc/config/system @@ -1,6 +1,7 @@ config system option hostname lede option timezone UTC + option ttylogin 0 config timeserver ntp list server 0.openwrt.pool.ntp.org diff --git a/package/base-files/files/etc/inittab b/package/base-files/files/etc/inittab index 7817185937..9820e7144b 100644 --- a/package/base-files/files/etc/inittab +++ b/package/base-files/files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -::askconsole:/bin/ash --login +::askconsole:/usr/libexec/login.sh diff --git a/package/base-files/files/usr/libexec/login.sh b/package/base-files/files/usr/libexec/login.sh new file mode 100755 index 0000000000..02ac9c828b --- /dev/null +++ b/package/base-files/files/usr/libexec/login.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +[ "$(uci get system.@system[0].ttylogin)" == 1 ] || exec /bin/ash --login + +exec /bin/login diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index ee42fa12f0..5240616972 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -1212,10 +1212,10 @@ config BUSYBOX_DEFAULT_GETTY default n config BUSYBOX_DEFAULT_LOGIN bool - default n + default y config BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD bool - default n + default y config BUSYBOX_DEFAULT_LOGIN_SCRIPTS bool default n diff --git a/target/linux/adm5120/base-files/etc/inittab b/target/linux/adm5120/base-files/etc/inittab index 9f7c0aee35..d81d5d943b 100644 --- a/target/linux/adm5120/base-files/etc/inittab +++ b/target/linux/adm5120/base-files/etc/inittab @@ -1,5 +1,5 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -tts/0::askfirst:/bin/ash --login -ttyAM0::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +tts/0::askfirst:/usr/libexec/login.sh +ttyAM0::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/ar71xx/base-files/etc/inittab b/target/linux/ar71xx/base-files/etc/inittab index 7817185937..9820e7144b 100644 --- a/target/linux/ar71xx/base-files/etc/inittab +++ b/target/linux/ar71xx/base-files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -::askconsole:/bin/ash --login +::askconsole:/usr/libexec/login.sh diff --git a/target/linux/arm64/base-files/etc/inittab b/target/linux/arm64/base-files/etc/inittab index d9d571e8d9..be235d8792 100644 --- a/target/linux/arm64/base-files/etc/inittab +++ b/target/linux/arm64/base-files/etc/inittab @@ -1,5 +1,5 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -tts/0::askfirst:/bin/ash --login -ttyAMA0::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +tts/0::askfirst:/usr/libexec/login.sh +ttyAMA0::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/brcm2708/base-files/etc/inittab b/target/linux/brcm2708/base-files/etc/inittab index a6c0bc85a6..b944a93ada 100644 --- a/target/linux/brcm2708/base-files/etc/inittab +++ b/target/linux/brcm2708/base-files/etc/inittab @@ -1,4 +1,4 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -::askconsole:/bin/ash --login -tty1::askfirst:/bin/ash --login +::askconsole:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/ipq806x/base-files/etc/inittab b/target/linux/ipq806x/base-files/etc/inittab index 19a6e11950..809bba5e5f 100644 --- a/target/linux/ipq806x/base-files/etc/inittab +++ b/target/linux/ipq806x/base-files/etc/inittab @@ -1,4 +1,4 @@ # Copyright (c) 2013 The Linux Foundation. All rights reserved. ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -ttyMSM0::askfirst:/bin/ash --login +ttyMSM0::askfirst:/usr/libexec/login.sh diff --git a/target/linux/lantiq/base-files/etc/inittab b/target/linux/lantiq/base-files/etc/inittab index 46a1312c67..21fa8d58ef 100644 --- a/target/linux/lantiq/base-files/etc/inittab +++ b/target/linux/lantiq/base-files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K stop -ttyLTQ0::askfirst:/bin/ash --login +ttyLTQ0::askfirst:/usr/libexec/login.sh diff --git a/target/linux/malta/base-files/etc/inittab b/target/linux/malta/base-files/etc/inittab index 88567b245f..2697723804 100644 --- a/target/linux/malta/base-files/etc/inittab +++ b/target/linux/malta/base-files/etc/inittab @@ -1,7 +1,7 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -tts/0::askfirst:/bin/ash --login -ttyS0::askfirst:/bin/ash --login -ttyS1::askfirst:/bin/ash --login -ttyS2::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +tts/0::askfirst:/usr/libexec/login.sh +ttyS0::askfirst:/usr/libexec/login.sh +ttyS1::askfirst:/usr/libexec/login.sh +ttyS2::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/mediatek/base-files/etc/inittab b/target/linux/mediatek/base-files/etc/inittab index 870b3cc76d..b169c82745 100644 --- a/target/linux/mediatek/base-files/etc/inittab +++ b/target/linux/mediatek/base-files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -ttyS0::askfirst:/bin/ash --login +ttyS0::askfirst:/usr/libexec/login.sh diff --git a/target/linux/mxs/base-files/etc/inittab b/target/linux/mxs/base-files/etc/inittab index 09359b79d8..9991ac4909 100644 --- a/target/linux/mxs/base-files/etc/inittab +++ b/target/linux/mxs/base-files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -ttyAMA0::askfirst:/bin/ash --login +ttyAMA0::askfirst:/usr/libexec/login.sh diff --git a/target/linux/omap/base-files/etc/inittab b/target/linux/omap/base-files/etc/inittab index 502c6f87af..33897e1020 100644 --- a/target/linux/omap/base-files/etc/inittab +++ b/target/linux/omap/base-files/etc/inittab @@ -1,5 +1,5 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -ttyO0::askfirst:/bin/ash --login -ttyO2::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +ttyO0::askfirst:/usr/libexec/login.sh +ttyO2::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/omap24xx/base-files/etc/inittab b/target/linux/omap24xx/base-files/etc/inittab index 1360dc9e28..192115826a 100644 --- a/target/linux/omap24xx/base-files/etc/inittab +++ b/target/linux/omap24xx/base-files/etc/inittab @@ -1,5 +1,5 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -tts/0::askfirst:/bin/ash --login -ttyO2::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +tts/0::askfirst:/usr/libexec/login.sh +ttyO2::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/ppc44x/base-files/etc/inittab b/target/linux/ppc44x/base-files/etc/inittab index 67c36a6a9e..c929c3deac 100644 --- a/target/linux/ppc44x/base-files/etc/inittab +++ b/target/linux/ppc44x/base-files/etc/inittab @@ -1,4 +1,4 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -ttyS0::askfirst:/bin/ash --login -ttyS1::askfirst:/bin/ash --login +ttyS0::askfirst:/usr/libexec/login.sh +ttyS1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/ramips/base-files/etc/inittab b/target/linux/ramips/base-files/etc/inittab index 7817185937..9820e7144b 100644 --- a/target/linux/ramips/base-files/etc/inittab +++ b/target/linux/ramips/base-files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -::askconsole:/bin/ash --login +::askconsole:/usr/libexec/login.sh diff --git a/target/linux/realview/base-files/etc/inittab b/target/linux/realview/base-files/etc/inittab index d9d571e8d9..be235d8792 100644 --- a/target/linux/realview/base-files/etc/inittab +++ b/target/linux/realview/base-files/etc/inittab @@ -1,5 +1,5 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -tts/0::askfirst:/bin/ash --login -ttyAMA0::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +tts/0::askfirst:/usr/libexec/login.sh +ttyAMA0::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/sunxi/base-files/etc/inittab b/target/linux/sunxi/base-files/etc/inittab index e9de30bcc4..be81ab3e23 100644 --- a/target/linux/sunxi/base-files/etc/inittab +++ b/target/linux/sunxi/base-files/etc/inittab @@ -1,5 +1,5 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -tts/0::askfirst:/bin/ash --login -ttyS0::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +tts/0::askfirst:/usr/libexec/login.sh +ttyS0::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/x86/base-files/etc/inittab b/target/linux/x86/base-files/etc/inittab index ca90fd8a2a..d1b5a0fa22 100644 --- a/target/linux/x86/base-files/etc/inittab +++ b/target/linux/x86/base-files/etc/inittab @@ -1,4 +1,4 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -ttyS0::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +ttyS0::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/x86/xen_domu/base-files/etc/inittab b/target/linux/x86/xen_domu/base-files/etc/inittab index 469b8a9a9f..72e19c5b3d 100644 --- a/target/linux/x86/xen_domu/base-files/etc/inittab +++ b/target/linux/x86/xen_domu/base-files/etc/inittab @@ -1,5 +1,5 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K stop -tts/0::askfirst:/bin/ash --login -hvc0::askfirst:/bin/ash --login -tty1::askfirst:/bin/ash --login +tts/0::askfirst:/usr/libexec/login.sh +hvc0::askfirst:/usr/libexec/login.sh +tty1::askfirst:/usr/libexec/login.sh diff --git a/target/linux/zynq/base-files/etc/inittab b/target/linux/zynq/base-files/etc/inittab index ecccc8218b..9820e7144b 100644 --- a/target/linux/zynq/base-files/etc/inittab +++ b/target/linux/zynq/base-files/etc/inittab @@ -1,3 +1,3 @@ ::sysinit:/etc/init.d/rcS S boot ::shutdown:/etc/init.d/rcS K shutdown -::askconsole:/bin/ash --login
\ No newline at end of file +::askconsole:/usr/libexec/login.sh |