When /sbin/init from sysvinit is started with a kernel command line argument such as CONSOLE=/dev/tty1, the specified tty is used for text output instead of the foreground tty. Init forces this tty to be the controlling tty for all programs listed in inittab. When a program does not detach from this tty, it's killed at the end of the boot process. svscan doesn't detach itself from the it's controlling tty, and thus doesn't work properly when ttys other than /dev/tty are used by init. The problem can be easily fixed by making svscan run in its own session -- ie. by changing: start-stop-daemon --start --quiet --pidfile /var/run/svscan.pid --exec /usr/bin/svscan -- /service & to: setsid start-stop-daemon --start --quiet --pidfile /var/run/svscan.pid --exec /usr/bin/svscan -- /service &
why not patch svscan to detach from the controlling tty ?
svscan could be patched, but it would require adding a new daemon mode, parsing command line arguments, etc. I guess it's easier, faster and cleaner to add the 7 characters that 'setsid ' is composed of to /etc/init.d/svscan.
you would also need to redirect stdout and stderr to a file like /var/log/svscan.log. All in all svscan should be patched to iterate doit() once before closing stdout and stderr, reopen them from logfiles and fork() + setsid()
Fixed in CVS.