Package: splashy
Version: 0.3.8-1
Severity: important
Tags: patch
Hello,
trying to solve bugs #455685 [1] and #459447 [2], I found that splashy
always starts, even when its requirements are not satisfied. As
reported at [3], we can have two major boot situations when splashy is
installed:
- vga=NNN splash
all the requirements are there, splashy can start
- only vga=NNN (or video=), only splash, nothing, single
something is missing, splashy should not start (and no code related to
it should be executed).
If splashy is always started, in the latter situation you always receive
a segfault, reproducible with `splashy test` (log attached). I guess
bug #458959 [4] is related to this situation.
For this reason I reworked the init.d and initramfs scripts to have
saner checks. I based my test on the 0.3.8 version, so something could
be different from the git tree. We rely on /proc/cmdline to know if we
can or cannot start splashy, based on the following reasoning.
- parsing /proc/cmdline in the same way as [5] is the best thing: it
contains all splashy requirements. This removes the last grep line
(already commented out in the git tree), which BTW didn't work at
least on my sid-amd64 when booting with 'splash' only [2].
For these checks I really prefer to have a separate script, because it
avoids code duplication. The script should just return 0 in case
splashy can be enabled and 1 in case not. If needed, we can support
the -v|--verbose argument. I'd say that having the checks inside the
main splashy code (`splashy check`) would be the best thing to do.
- when no vga= or video= command line is provided, AFAIK even if fbcon
and vesafb are inserted (on Debian kernel they're compiled in by
default), /proc/fb is present, but with zero size. Thus, when
checking for /proc/fb to create /dev nodes we should check for its
size (test -s). However, according to [6] and [7], if no vga= or
video= parameter is specified, fb is not initialised ([2] and [4]).
I guess the segfaults at [2] and [4] (as well as the one in the
`splashy test` output attached) are caused by the fact that splashy
tries to start even if there's no fb available.
- log_warning_message doesn't exists, it's log_warning_msg
With these patch, together with the one I provided at [3], I can boot
with all the possible combinations, with or without splashy support in
the initramfs.
Comments and suggestions welcome!
Thx, bye,
Gismo / Luca
Footnotes:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455685
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=459447
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455685#73
[4] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458959
[5] /usr/share/initramfs-tools/scripts/init-top/framebuffer
[6] linux/Documentation/fb/vesafb.txt
[7] linux/Documentation/svga.txt
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.24-rc6-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages splashy depends on:
ii initramfs-tools 0.91d tools for generating an initramfs
ii libc6 2.7-5 GNU C Library: Shared libraries
ii libdirectfb-1.0-0 1.0.1-5 direct frame buffer graphics - sha
ii libgcc1 1:4.3-20080104-1 GCC support library
ii libglib2.0-0 2.14.4-2 The GLib library of C routines
ii libmagic1 4.21-4 File type determination library us
ii libsplashy1 0.3.8-1 Library to draw splash screen on b
ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip
ii zlib1g 1:1.2.3.3.dfsg-8 compression library - runtime
splashy recommends no packages.
-- no debconf information
Script started on Sat 05 Jan 2008 06:46:32 PM CET
[EMAIL PROTECTED]:~# cat /proc/cmdline
BOOT_IMAGE=(hd0,1)/vmlinuz-2.6.22-3-amd64 root=/dev/mapper/vggismo-lvroot ro
splash
[EMAIL PROTECTED]:~# strace splashy test
execve("/sbin/splashy", ["splashy", "test"], [/* 12 vars */]) = 0
brk(0) = 0x605000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b6db6d29000
uname({sys="Linux", node="gismo.pca.it", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b6db6d2a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/lib/directfb-1.0-0/systems/tls/x86_64/libsplashycnf.so.1", O_RDONLY) =
-1 ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/systems/tls/x86_64", 0x7ffff3d9cf00) = -1 ENOENT (No
such file or directory)
open("/lib/directfb-1.0-0/systems/tls/libsplashycnf.so.1", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/systems/tls", 0x7ffff3d9cf00) = -1 ENOENT (No such
file or directory)
open("/lib/directfb-1.0-0/systems/x86_64/libsplashycnf.so.1", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/systems/x86_64", 0x7ffff3d9cf00) = -1 ENOENT (No such
file or directory)
open("/lib/directfb-1.0-0/systems/libsplashycnf.so.1", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat("/lib/directfb-1.0-0/systems", 0x7ffff3d9cf00) = -1 ENOENT (No such file
or directory)
open("/lib/directfb-1.0-0/wm/tls/x86_64/libsplashycnf.so.1", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/wm/tls/x86_64", 0x7ffff3d9cf00) = -1 ENOENT (No such
file or directory)
open("/lib/directfb-1.0-0/wm/tls/libsplashycnf.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/lib/directfb-1.0-0/wm/tls", 0x7ffff3d9cf00) = -1 ENOENT (No such file or
directory)
open("/lib/directfb-1.0-0/wm/x86_64/libsplashycnf.so.1", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat("/lib/directfb-1.0-0/wm/x86_64", 0x7ffff3d9cf00) = -1 ENOENT (No such file
or directory)
open("/lib/directfb-1.0-0/wm/libsplashycnf.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/lib/directfb-1.0-0/wm", 0x7ffff3d9cf00) = -1 ENOENT (No such file or
directory)
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/tls/x86_64/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/tls/x86_64",
0x7ffff3d9cf00) = -1 ENOENT (No such file or directory)
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/tls/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/tls", 0x7ffff3d9cf00)
= -1 ENOENT (No such file or directory)
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/x86_64/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/x86_64",
0x7ffff3d9cf00) = -1 ENOENT (No such file or directory)
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider/tls/x86_64/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider/tls/x86_64",
0x7ffff3d9cf00) = -1 ENOENT (No such file or directory)
open("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider/tls/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider/tls",
0x7ffff3d9cf00) = -1 ENOENT (No such file or directory)
open("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider/x86_64/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider/x86_64",
0x7ffff3d9cf00) = -1 ENOENT (No such file or directory)
open("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/interfaces/IDirectFBImageProvider", 0x7ffff3d9cf00) =
-1 ENOENT (No such file or directory)
open("/lib/directfb-1.0-0/inputdrivers/tls/x86_64/libsplashycnf.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/inputdrivers/tls/x86_64", 0x7ffff3d9cf00) = -1 ENOENT
(No such file or directory)
open("/lib/directfb-1.0-0/inputdrivers/tls/libsplashycnf.so.1", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/inputdrivers/tls", 0x7ffff3d9cf00) = -1 ENOENT (No
such file or directory)
open("/lib/directfb-1.0-0/inputdrivers/x86_64/libsplashycnf.so.1", O_RDONLY) =
-1 ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/inputdrivers/x86_64", 0x7ffff3d9cf00) = -1 ENOENT (No
such file or directory)
open("/lib/directfb-1.0-0/inputdrivers/libsplashycnf.so.1", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/lib/directfb-1.0-0/inputdrivers", 0x7ffff3d9cf00) = -1 ENOENT (No such
file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=51182, ...}) = 0
mmap(NULL, 51182, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b6db6d2c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libsplashycnf.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\17\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=10824, ...}) = 0
mmap(NULL, 2106224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db6f2a000
mprotect(0x2b6db6f2c000, 2097152, PROT_NONE) = 0
mmap(0x2b6db712c000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2b6db712c000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libsplashy.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libsplashy.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\24\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=20832, ...}) = 0
mmap(NULL, 2116408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db712d000
mprotect(0x2b6db7132000, 2093056, PROT_NONE) = 0
mmap(0x2b6db7331000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x2b6db7331000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libgcc_s.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 ,\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=93016, ...}) = 0
mmap(NULL, 2188856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db7332000
mprotect(0x2b6db7348000, 2097152, PROT_NONE) = 0
mmap(0x2b6db7548000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x2b6db7548000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libm.so.6", O_RDONLY)
= -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260>\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=526560, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b6db7549000
mmap(NULL, 2621672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db754a000
mprotect(0x2b6db75ca000, 2093056, PROT_NONE) = 0
mmap(0x2b6db77c9000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7f000) = 0x2b6db77c9000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libglib-2.0.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libglib-2.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260<\1\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=708088, ...}) = 0
mmap(NULL, 2805064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db77cb000
mprotect(0x2b6db7877000, 2093056, PROT_NONE) = 0
mmap(0x2b6db7a76000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xab000) = 0x2b6db7a76000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libdirectfb-1.0.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libdirectfb-1.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>[EMAIL PROTECTED]"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=455976, ...}) = 0
mmap(NULL, 2553144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db7a78000
mprotect(0x2b6db7ae4000, 2097152, PROT_NONE) = 0
mmap(0x2b6db7ce4000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6c000) = 0x2b6db7ce4000
mmap(0x2b6db7ce7000, 1336, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b6db7ce7000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libfusion-1.0.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libfusion-1.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P-\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=33160, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b6db7ce8000
mmap(NULL, 2128568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db7ce9000
mprotect(0x2b6db7cf1000, 2093056, PROT_NONE) = 0
mmap(0x2b6db7ef0000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x2b6db7ef0000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libdirect-1.0.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libdirect-1.0.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0pB\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=83376, ...}) = 0
mmap(NULL, 2181168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db7ef1000
mprotect(0x2b6db7f05000, 2093056, PROT_NONE) = 0
mmap(0x2b6db8104000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x2b6db8104000
mmap(0x2b6db8105000, 2096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b6db8105000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libpthread.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260W\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=126128, ...}) = 0
mmap(NULL, 2204528, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db8106000
mprotect(0x2b6db811c000, 2093056, PROT_NONE) = 0
mmap(0x2b6db831b000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x2b6db831b000
mmap(0x2b6db831d000, 13168, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b6db831d000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libc.so.6", O_RDONLY)
= -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\342"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1420624, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b6db8321000
mmap(NULL, 3527256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db8322000
mprotect(0x2b6db8476000, 2097152, PROT_NONE) = 0
mmap(0x2b6db8676000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x154000) = 0x2b6db8676000
mmap(0x2b6db867b000, 16984, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b6db867b000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libpcre.so.3",
O_RDONLY) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpcre.so.3", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220&\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=160840, ...}) = 0
mmap(NULL, 2256136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db8680000
mprotect(0x2b6db86a6000, 2097152, PROT_NONE) = 0
mmap(0x2b6db88a6000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x2b6db88a6000
close(3) = 0
open("/usr/lib64/directfb-1.0-0/interfaces/IDirectFBFont/libdl.so.2", O_RDONLY)
= -1 ENOENT (No such file or directory)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \16\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14624, ...}) = 0
mmap(NULL, 2109728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x2b6db88a7000
mprotect(0x2b6db88a9000, 2097152, PROT_NONE) = 0
mmap(0x2b6db8aa9000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x2b6db8aa9000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b6db8aab000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2b6db8aac000
arch_prctl(ARCH_SET_FS, 0x2b6db8aac630) = 0
mprotect(0x2b6db8676000, 12288, PROT_READ) = 0
munmap(0x2b6db6d2c000, 51182) = 0
set_tid_address(0x2b6db8aac6c0) = 3147
set_robust_list(0x2b6db8aac6d0, 0x18) = 0
futex(0x7ffff3d9da3c, 0x81 /* FUTEX_??? */, 1) = 0
rt_sigaction(SIGRTMIN, {0x2b6db810b2d0, [], SA_RESTORER|SA_SIGINFO,
0x2b6db81147d0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x2b6db810b350, [], SA_RESTORER|SA_RESTART|SA_SIGINFO,
0x2b6db81147d0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
close(0) = 0
open("/dev/null", O_RDWR) = 0
close(1) = 0
open("/dev/null", O_RDWR) = 1
stat("/etc/splashy/config.xml", {st_mode=S_IFREG|0644, st_size=549, ...}) = 0
brk(0) = 0x605000
brk(0x626000) = 0x626000
stat("/etc/splashy/config.xml", {st_mode=S_IFREG|0644, st_size=549, ...}) = 0
open("/usr/lib/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/splashy/config.xml", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=549, ...}) = 0
read(3, "<?xml version=\"1.0\" encoding=\"UT"..., 549) = 549
close(3) = 0
stat("/etc/splashy/themes/debian-swirl///theme.xml", {st_mode=S_IFREG|0644,
st_size=4995, ...}) = 0
stat("/etc/splashy/themes/debian-swirl///theme.xml", {st_mode=S_IFREG|0644,
st_size=4995, ...}) = 0
stat("/etc/splashy/themes/debian-swirl///theme.xml", {st_mode=S_IFREG|0644,
st_size=4995, ...}) = 0
open("/etc/splashy/themes/debian-swirl///theme.xml", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4995, ...}) = 0
read(3, "<?xml version=\"1.0\" encoding=\"UT"..., 4995) = 4995
close(3) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x2b6db8aac6c0) = 3148
exit_group(0) = ?
Process 3147 detached
[EMAIL PROTECTED]:~# Splashy ERROR: Couldn't splashy_start_splashy(). Error -2
splashy[3148]: segfault at 0000000000000018 rip 00002b6db712f4c7 r sp
00007ffff3d9da00 error 4
[EMAIL PROTECTED]:~# exit
Script done on Sat 05 Jan 2008 06:47:35 PM CET
diff --git a/scripts/init.d/splashy b/scripts/init.d/splashy
index 879ff0f..8677e0f 100755
--- a/scripts/init.d/splashy
+++ b/scripts/init.d/splashy
@@ -13,6 +13,7 @@
# Author: Tim Dijkstra <[EMAIL PROTECTED]>,
# Luis Mondesi <[EMAIL PROTECTED]>
+# Luca Capello <[EMAIL PROTECTED]>
#
# If called in the rc[06].d runlevels with the stop target it will start
# splashy in 'shutdown' mode. In the rcS.d runlevel it will try
@@ -55,12 +56,39 @@ fi
set -e
-[ "$ENABLE" = "1" ] && log_warning_message "To enable $NAME add 'splash' to the kernel command line. Use of ENABLE in /etc/default/$NAME is deprecated.";
-ENABLE=0
-# Enable splash parameter if it is set on the kernel command line.
-grep -q -e '[[:space:]]splash\([[:space:]]\|$\)' /proc/cmdline && ENABLE=1
-grep -q -e '[[:space:]]nosplash\([[:space:]]\|$\)' /proc/cmdline && ENABLE=0
+[ "$ENABLE" = "1" ] && log_warning_msg "To enable $NAME add 'splash' to the kernel command line. Use of ENABLE in /etc/default/$NAME is deprecated.";
+
+check_to_enable () {
+ ENABLE=0
+ SINGLE=false
+ SPLASH=false
+ FBMODESET=false
+
+ for x in $(cat /proc/cmdline); do
+ case $x in
+ single)
+ SINGLE=true
+ ;;
+ splash)
+ SPLASH=true
+ ;;
+ nosplash)
+ SPLASH=false
+ ;;
+ vga=*|video=*)
+ FBMODESET=true
+ ;;
+ esac
+ done
+ [ "$SPLASH" = "true" -a "$FBMODESET" = "true" ] && ENABLE=1
+ [ "$SINGLE" = "true" ] && ENABLE=0
+
+ if [ "$ENABLE" = "0" ]; then
+ log_warning_msg "To enable $NAME on multiuser runlevel add 'splash' and a valid framebuffer videomode to the kernel command line"
+ exit 0
+ fi
+}
calculate_steps () {
log_daemon_msg "(Re)generating splash steps for"
@@ -115,24 +143,24 @@ fi
case "$1" in
start)
- # We start splashy in rcS.d if we haven't already in initramfs
- if [ "x$RUNLEVEL" = "xN S" -o "x$RUNLEVEL" = "xS" ]; then
- [ "$ENABLE" = "1" ] || exit 0;
-
- calculate_steps
-
- log_daemon_msg "Starting $DESC" $NAME
- if [ "$DEBUG" = "1" ]; then
- pidof $NAME > /dev/null || \
- echo "$0: Splashy not running?" >> $STEPS_DIR/splashy.log
- fi
- pidof $NAME > /dev/null || /sbin/$NAME boot
- log_end_msg $?
+ check_to_enable
+
+ # We start splashy in rcS.d if we haven't already in initramfs
+ [ "x$RUNLEVEL" = "xN S" -o "x$RUNLEVEL" = "xS" ] || exit 0
+
+ calculate_steps
+
+ log_daemon_msg "Starting $DESC" $NAME
+ if [ "$DEBUG" = "1" ]; then
+ pidof $NAME > /dev/null || \
+ echo "$0: Splashy not running?" >> $STEPS_DIR/splashy.log
fi
+ pidof $NAME > /dev/null || /sbin/$NAME boot
+ log_end_msg $?
;;
stop)
+ check_to_enable
- [ "$ENABLE" = "1" ] || exit 0;
calculate_steps
log_daemon_msg "Starting $DESC" $NAME
diff --git a/scripts/initramfs-tools/scripts/init-top/splashy b/scripts/initramfs-tools/scripts/init-top/splashy
index 4d01bf3..76e1a71 100755
--- a/scripts/initramfs-tools/scripts/init-top/splashy
+++ b/scripts/initramfs-tools/scripts/init-top/splashy
@@ -25,24 +25,32 @@ silent()
test -x /sbin/splashy || exit
SPLASH=false
SINGLE=false
+FBMODESET=false
for x in $(cat /proc/cmdline); do
case $x in
- splash*)
+ single)
+ SINGLE=true
+ ;;
+ splash)
SPLASH=true
;;
- single=*)
- SINGLE=true
+ nosplash)
+ SPLASH=false
+ ;;
+ vga=*|video=*)
+ FBMODESET=true
;;
esac
done
test $SINGLE = "false" || exit
test $SPLASH = "true" || exit
+test $FBMODESET = "true" || exit
depmod -a
silent modprobe fbcon
silent modprobe vesafb
-if [ -e /proc/fb ]; then
+if [ -s /proc/fb ]; then
while read fbno desc; do
mknod /dev/fb${fbno} c 29 ${fbno}
done < /proc/fb
@@ -55,15 +63,6 @@ for i in 0 1 2 3 4 5 6 7 8; do
mknod /dev/tty${i} c 4 ${i}
done
-# [ tdykstra ]
-# This is supposed to replace the test for vga=
-# on the command line. Didn't test it much...
-# Luis Mondesi
-# Splashy will show error if /proc/fb is not
-# set correctly. This assumes users have vesafb
-# commenting it out
-#grep -q '\(VESA\|VGA\)' /proc/fb || exit
-
if [ -x /sbin/splashy_chvt ]; then
/sbin/splashy_chvt 8
fi