casper misinterprets ipv6.disable=1 on kernel command line

Bug #586553 reported by Bill Nickless
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
Fix Released
Undecided
Colin Watson

Bug Description

Binary package hint: casper

In Lucid (casper 1.236), the script /usr/share/initramfs-tools/scripts/casper has a function parse_cmdline. It iterates over the words in /proc/cmdline looking for boot options. Inside that loop is a case statement. Starting in line 43 we see:

            ip*)
                STATICIP=${x#ip=}
                if [ "${STATICIP}" = "" ]; then
                    STATICIP="frommedia"
                fi
                export STATICIP ;;

This usually works great, until ipv6.disable=1 also on the kernel command line. That matches this case, and casper ends up creating an /etc/interfaces file that tries to set the static IP address "ipv6.disable=1". Probably not the desired behavior!

Partial workaround: ensure any ip= options come AFTER the ipv6.disable=1 on the kernel command line. The second match overwrites the original STATICIP variable setting. Of course, this won't work if the goal is to have casper establish an /etc/network/interfaces file even if ipv6 is disabled.

Recommend adjusting the case match from "ip*)" to "ip=*)" on line 43, so that it won't match "ipv6.disable=1".

Revision history for this message
Colin Watson (cjwatson) wrote :

Applied, thanks.

Changed in casper (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.237

---------------
casper (1.237) maverick; urgency=low

  [ Colin Watson ]
  * Add btrfs support.
  * Make ip=* command-line parsing more precise (thanks, Bill Nickless;
    LP: #586553).
  * Make the USB update-initramfs shim cope with vmlinuz and initrd.img
    being in /boot rather than / (LP: #591207).
  * Depend on file for /etc/init.d/casper (thanks, Alon Swartz;
    LP: #591213).
  * Conflict with live-initramfs, as they overlap and people can pick one or
    the other (LP: #453476).

  [ Martin Pitt ]
  * debian/casper.init: Change shutdown splash message to refer to
    "installation media" instead of "disc"; a lot of installs happen
    from USB sticks these days. Thanks to Debbie Beliveau for the idea.
 -- Colin Watson <email address hidden> Mon, 28 Jun 2010 16:53:17 +0100

Changed in casper (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.