I have just taken a look at the bzr verision... it looks broken.
There are 2 components that have been mixed up... (1) using casper-getty to do auto-login. (2) automatically ensuring there is a getty on the serial line if there is a serial console (which just happens to use casper-getty). It seem that the serial console setection code has been moved into the casper script from 25configure_init. During this move the logic has been changed so that in casper script the console has to be serial for the CASPERGETTY to be exported... this is (in my opinion) wrong. The attached patch (avainst bzr repo) exports CASPERGETTY and DEFCONSOLE _independently_ in in casper. The test "is DEFCONSOLE = serial" is moved back into 25configure_init. If the test is to be left in casper then in my opinion the variable should be renamed to SERCONSOLE, however I prefer to leave it as DEFCONSOLE as it may be usefull elsewhere. The patch also fixes up 25configure_init to do the tasks (1) and (2) independently. At some stage someone ought to write a casper-getty stanza for the event.d mechanism... another day! Regards Alex Owen On 22/10/06, Marco Amadori <[EMAIL PROTECTED]> wrote:
Alle 15:41, domenica 22 ottobre 2006, Alex Owen ha scritto: > The attached patch fixes the casper-getty setup. > There were reports that it did not work on cdrom boots. I don't think > the code in 1.71+debian1 could have worked at all net or cd boot. I > have tested the new code by booting a cdrom image using qemu. This > test shows the code works. A similar patch was already lying in bzr repository, thanks anyway for that, will be fixed in the next upload. P.S. Since the repository is public, as a suggestion, look in here before sending patches to avoid duplicated efforts. -- ESC:wq
=== modified file 'scripts/casper' --- scripts/casper 2006-10-22 15:57:37 +0000 +++ scripts/casper 2006-10-22 17:32:09 +0000 @@ -86,9 +86,11 @@ esac done - if [ ! -z "${CASPERGETTY}" ] && echo "${DEFCONSOLE}" | grep -qs ttyS ; then + if [ -n "${DEFCONSOLE}" ] ; then + export DEFCONSOLE + fi + if [ -n "${CASPERGETTY}" ] ; then export CASPERGETTY - export DEFCONSOLE else unset CASPERGETTY fi === modified file 'scripts/casper-bottom/25configure_init' --- scripts/casper-bottom/25configure_init 2006-10-22 16:06:24 +0000 +++ scripts/casper-bottom/25configure_init 2006-10-22 17:30:53 +0000 @@ -23,7 +23,9 @@ # Arrange for shells on virtual consoles, rather than login prompts if [ -n "$USERNAME" ]; then - if [ ! -z "${CASPERGETTY}" ]; then + if [ -n "${CASPERGETTY}" ]; then + if [ -n "${DEFCONSOLE}" ] ; then + if echo "${DEFCONSOLE}" |grep -qs ttyS; then # AUTOMATIC SERIAL CONSOLE # PORT=$(echo "${DEFCONSOLE}" | \ sed -e 's%,.*%%') @@ -44,6 +46,8 @@ echo "${ID}:2345:respawn:/sbin/casper-getty -L ${PORT} ${SPEED} vt100" \ >>/root/etc/inittab fi + fi + fi if [ -f /root/etc/inittab ]; then sed -i -e'/^[^#]/s%respawn:/sbin/getty%respawn:/sbin/casper-getty%' /root/etc/inittab fi