start on started icd2
console output
script
    # Generate the key only once (set this to YES if you want to generate it
    # in every boot)
    GEN_DHCP6CCTLKEY=NO

    # Create the key file for communication between dhcp6ctl and dhcp6c
    # The key file cannot be created when installing packet because then every
    # osso device would have the same key.
    DHCP6CCTLKEY=/etc/wide-dhcpv6/dhcp6cctlkey

    # IPv6 enable status is in gconf
    IAP_BASE=/system/osso/connectivity/IAP
    IPV6_KEY=$IAP_BASE/ipv6_enabled
    IPV6=`gconftool-2 -g "$IPV6_KEY" 2> /dev/null`
    if [ -z "$IPV6" ]; then
        # disabled if not found
        exit 0
    fi
    if [ "$IPV6" = 0 ]; then
        # not enabled
        exit 0
    fi
    IFACES=`gconftool-2 -g "$IAP_BASE/ipv6_interfaces" 2> /dev/null`
    if [ -z "$IFACES" ]; then
        echo "DHCPv6 interfaces list not defined in gconf, dhcpv6 is disabled."
        exit 0
    fi
    INTERFACES=`echo "$IFACES" | sed -e 's/\[//g' -e 's/\]//g'`
    [ "X$INTERFACES" != "X" ] || exit 0

    [ ! -r $DHCP6CCTLKEY -o ! -s $DHCP6CCTLKEY -o "$GEN_DHCP6CCTLKEY" != "NO" ] && {
        # The key must not be world readable
        umask 066
        echo "Generating ${DHCP6CCTLKEY}..." >&2
        dd if=/dev/urandom bs=24 count=1 2>/dev/null | md5sum - | sed 's/  -//' > ${DHCP6CCTLKEY}
        umask 022
    }

    exit 0
end script
