Skip to contentSkip to conversation

Make initscripts banner stop trying to be smart

RFC PATCH In review Tom Rini 3 participants 3 messages Apr 23, 2009 – Apr 25, 2009

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

RFC PATCH 1/1 Make initscripts banner stop trying to be smart

I ran into this on my boards that start out with the really minimal (console and null only) set of dev nodes prior to udev running. The banner script looks around for what might be the vtmaster (aka what's got console) to say that we're booting. But that's where things go by default anyhow. This would also let slugos use the normal version, if they want.

recipes/initscripts/initscripts-1.0/banner +1 -15
index 0349ce1..4e69c29 100644
@@ -1,17 +1,3 @@
 #!/bin/sh
 
-if [ ! -e /dev/tty ]; then
-    /bin/mknod -m 0666 /dev/tty c 5 0
-fi
-
-if ( > /dev/tty0 ) 2>/dev/null; then
-    vtmaster=/dev/tty0
-elif ( > /dev/vc/0 ) 2>/dev/null; then
-    vtmaster=/dev/vc/0
-elif ( > /dev/console ) 2>/dev/null; then
-    vtmaster=/dev/console
-else
-    vtmaster=/dev/null
-fi
-echo > $vtmaster
-echo "Please wait: booting..." > $vtmaster
+echo "Please wait: booting..."
recipes/initscripts/initscripts_1.0.bb +1 -1
index cbcfec5..6642144 100644
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS = "makedevs"
 LICENSE = "GPL"
-PR = "r114"
+PR = "r115"
 
 SRC_URI = "file://functions \
            file://halt \
Signature · 1 line
Tom Rini
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Tom Rini

I ran into this on my boards that start out with the really minimal (console and null only) set of dev nodes prior to udev running. The banner script looks around for what might be the vtmaster (aka what's got console) to say that we're booting. But that's where things go by default anyhow. This would also let slugos use the normal version, if they want.

I looked into the history of this file and it seems it stems from the creation of the OE project (when we still had .oe files) and the only edit to is is to add the check for /dev/console.

Anyway:

Quoted 39 lines
recipes/initscripts/initscripts-1.0/banner +1 -15
index 0349ce1..4e69c29 100644
@@ -1,17 +1,3 @@
  #!/bin/sh
 
-if [ ! -e /dev/tty ]; then
-    /bin/mknod -m 0666 /dev/tty c 5 0
-fi
-
-if (>  /dev/tty0 ) 2>/dev/null; then
-    vtmaster=/dev/tty0
-elif (>  /dev/vc/0 ) 2>/dev/null; then
-    vtmaster=/dev/vc/0
-elif (>  /dev/console ) 2>/dev/null; then
-    vtmaster=/dev/console
-else
-    vtmaster=/dev/null
-fi
-echo>  $vtmaster
-echo "Please wait: booting...">  $vtmaster
+echo "Please wait: booting..."
recipes/initscripts/initscripts_1.0.bb +1 -1
index cbcfec5..6642144 100644
@@ -4,7 +4,7 @@ PRIORITY = "required"
  DEPENDS = "makedevs"
  RDEPENDS = "makedevs"
  LICENSE = "GPL"
-PR = "r114"
+PR = "r115"
 
  SRC_URI = "file://functions \
             file://halt \
Acked-by on v1 1/1
#2 lore raw
In reply to Tom Rini
Quoted 8 lines · Tom Rini

I ran into this on my boards that start out with the really minimal (console and null only) set of dev nodes prior to udev running. The banner script looks around for what might be the vtmaster (aka what's got console) to say that we're booting. But that's where things go by default anyhow. This would also let slugos use the normal version, if they want.

Yes, SlugOS will happily return to using the normal version. :)

Quoted 37 lines
recipes/initscripts/initscripts-1.0/banner +1 -15
index 0349ce1..4e69c29 100644
@@ -1,17 +1,3 @@
 #!/bin/sh
 
-if [ ! -e /dev/tty ]; then
-    /bin/mknod -m 0666 /dev/tty c 5 0
-fi
-
-if ( > /dev/tty0 ) 2>/dev/null; then
-    vtmaster=/dev/tty0
-elif ( > /dev/vc/0 ) 2>/dev/null; then
-    vtmaster=/dev/vc/0
-elif ( > /dev/console ) 2>/dev/null; then
-    vtmaster=/dev/console
-else
-    vtmaster=/dev/null
-fi
-echo > $vtmaster
-echo "Please wait: booting..." > $vtmaster
+echo "Please wait: booting..."
recipes/initscripts/initscripts_1.0.bb +1 -1
index cbcfec5..6642144 100644
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS = "makedevs"
 LICENSE = "GPL"
-PR = "r114"
+PR = "r115"
 
 SRC_URI = "file://functions \
            file://halt \