mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-15 13:32:59 +02:00
flash-images: merge normal and scon to one image.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -5,24 +5,16 @@ if [ -e /var/ipfire/main/firstsetup_ok ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# Edit the serial console entry at /etc/inittab matching to console parameter.
|
||||
ser_console() {
|
||||
while test x"$1" != x
|
||||
do
|
||||
case $1 in
|
||||
console=*)
|
||||
scon=${1##console=};
|
||||
sed -i -e "s|^7:2345:respawn:/sbin/agetty.*|7:2345:respawn:/sbin/agetty ${scon%%,*}|g" /etc/inittab
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
cmdline=`cat /proc/cmdline`
|
||||
ser_console $cmdline
|
||||
# disable consoles if tty2 are not present
|
||||
if [ ! -e /dev/tty2 ]; then
|
||||
# Disable console on tty2-6
|
||||
sed -i -e "s|2:2345:respawn:|#2:2345:respawn:|g" /etc/inittab
|
||||
sed -i -e "s|3:2345:respawn:|#3:2345:respawn:|g" /etc/inittab
|
||||
sed -i -e "s|4:2345:respawn:|#4:2345:respawn:|g" etc/inittab
|
||||
sed -i -e "s|5:2345:respawn:|#5:2345:respawn:|g" /etc/inittab
|
||||
sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" /etc/inittab
|
||||
fi
|
||||
|
||||
# reload inittab
|
||||
/sbin/init q
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user