diff --git a/package/base-files/files/etc/config/system b/package/base-files/files/etc/config/system index 20517f9a530b020833996f3ef50c7fd0ad966a5b..80c3f9b0a8fb32c707e8d8c44596fb637ce6fdb4 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 7817185937f9ddb30fca2a417717be1a46e8ac11..9820e7144bed618f1375661f4e413f1b4979b584 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 0000000000000000000000000000000000000000..02ac9c828bc82e91af9b116efab5555df0a7706d --- /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 ee42fa12f02c1c01e157b2ff923e9490ea3d8cd3..52406169725348aafc9aa6e7ebf65bd4138b7369 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 9f7c0aee35c8a5d0acefc6d4ce51b397c3ee3687..d81d5d943be92283403ae067c4836581bfb904da 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 7817185937f9ddb30fca2a417717be1a46e8ac11..9820e7144bed618f1375661f4e413f1b4979b584 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 d9d571e8d9c49a438d9882b1b9b7132be2cb4c87..be235d8792635a653a0d3cca4a86c9bd8eea868e 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 a6c0bc85a62b85c3725c6f117acfc78e5e820668..b944a93ada4b5ac92bb9ce3ba6981639abca741c 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 19a6e1195011277d10810374e78132c4dcadc569..809bba5e5ff49869429c91cf791cea73ab67d14e 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 46a1312c67ce4ec17a0c1400d979777e94742f2f..21fa8d58ef623243fd460cc8364b746302208772 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 88567b245f2b9c5034a602fb183a10c236ad533d..269772380499fd6496a3cd8048e2e9e347582b2c 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 870b3cc76d1259ed730a720a1ef87acb290532a9..b169c82745ce014fe124274dfd4ba0e32dde6b52 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 09359b79d816f3812bd7c87b13e7e77122f50bd2..9991ac490937aa706472125bf2fe62fb3a91880b 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 502c6f87afaf5f6366b930765b8c7f93438b7ff2..33897e10207744037d0766dd08e4719c8109b29b 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 1360dc9e28c7f992f8edd6afeb513d601bb8ffd6..192115826a2d96d346d084cfab4f93025b4444dc 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 67c36a6a9ec6236dbb8bedcc9b8afe79cd88b7de..c929c3deac70661d6e1f585d572c2ae409c6016d 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 7817185937f9ddb30fca2a417717be1a46e8ac11..9820e7144bed618f1375661f4e413f1b4979b584 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 d9d571e8d9c49a438d9882b1b9b7132be2cb4c87..be235d8792635a653a0d3cca4a86c9bd8eea868e 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 e9de30bcc49c487a33981257f357a2c6f8fd72d1..be81ab3e23879f817b4bf09f5fe50e21c9b8ff54 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 ca90fd8a2abd4f27e6ef78e0d5629e241b6d5d50..d1b5a0fa22d46f57920b6efa9a3731f20f3cd3c7 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 469b8a9a9f61d425b3ff7d7014f3dd4777e9a3f0..72e19c5b3d89198b502960d89d278949c96ac724 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 ecccc8218b05d36651227cffad988eabb4446333..9820e7144bed618f1375661f4e413f1b4979b584 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