Add compatibility with older cmdline setup on console argument
authorFabio Erculiani <lxnay@sabayon.org>
Tue, 4 Jan 2011 22:20:19 +0000 (23:20 +0100)
committerFabio Erculiani <lxnay@sabayon.org>
Thu, 20 Jan 2011 18:10:52 +0000 (19:10 +0100)
Older systems featured full path to tty inside console=. This
is no longer valid and causes issues with fbcondecor. The new
expected format of console= is tty name with the directory part
stripped off: console=tty1 for example.
This patch has been in sabayon's genkernel for <2 years, but
should be tested out on non-standard environments.

defaults/linuxrc

index 9e40b318a53c5576de4ad0e84220fc0cb95090bf..0083fce1eda17ab0e835f6b6874acd4d20911ed1 100755 (executable)
@@ -135,6 +135,7 @@ do
                # Redirect output to a specific tty
                CONSOLE\=*|console\=*)
                        CONSOLE=`parse_opt "${x}"`
+                       CONSOLE=`basename ${CONSOLE}`
 #                      exec >${CONSOLE} <${CONSOLE} 2>&1
                ;;
                # /dev/md