[lantiq] update /etc/uci-defaults/*
[openwrt.git] / target / linux / ar71xx / base-files / etc / uci-defaults / inittab-console-fixup
1 #!/bin/sh
2 #
3 # Copyright (C) 2011 OpenWrt.org
4 #
5
6 enable_console_login() {
7 local cons=$1
8 local initline="$cons::askfirst:/bin/ash --login"
9
10 grep -qs "^$initline" /etc/inittab || {
11 echo "$initline" >> /etc/inittab
12 sync
13 kill -HUP 1
14 }
15 }
16
17 inittab_console_fixup() {
18 for cons in ttyS0 ttyATH0; do
19 grep -qs "console=$cons" /proc/cmdline && {
20 enable_console_login $cons
21 }
22 done
23 }
24
25 inittab_console_fixup
26
27 exit 0
This page took 0.044408 seconds and 5 git commands to generate.