[OpenWrt-Devel] [PATCH] base-files utils/busybox: Make requiring login in console default for easily accessed devices

Felix Fietkau nbd at openwrt.org
Wed Dec 23 11:26:45 EST 2015


On 2015-12-16 15:59, openwrt at daniel.thecshore.com wrote:
> From: Daniel Dickinson <openwrt at daniel.thecshore.com>
> 
> Some devices like generic PC's and Raspberry Pi/Pi2 are much more trivial to
> get hardware console access than a typical router scenario and therefore really
> ought to require login even on hardware console rather than a hardware console
> granting passwordless root access.
> 
> Since we're at it, we also make requiring login on hardware console an
> easily configured build-time option.
> 
> Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>

> diff --git a/target/linux/adm5120/base-files-console/etc/inittab b/target/linux/adm5120/base-files-console/etc/inittab
> new file mode 100644
> index 0000000..fb677d6
> --- /dev/null
> +++ b/target/linux/adm5120/base-files-console/etc/inittab
> @@ -0,0 +1,5 @@
> +::sysinit:/etc/init.d/rcS S boot
> +::shutdown:/etc/init.d/rcS K shutdown
> +tts/0::respawn:/sbin/getty -L 115200 tts/0
> +ttyAM0::respawn:/sbin/getty -L 115200 ttyAM0
> +tty1::respawn:/sbin/getty -L 115200 tty1
NACK on this kind of inittab change. We intentionally made the code
auto-detect the console based on what the kernel provides.
Please find a way to use this autodetection for login, e.g. by making a
wrapper that either spawns a shell or runs getty.
This would even be a nice way to make this feature runtime-configurable.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list