Tiny Core Base > TCB Bugs
Bootcode "Host" no longer works in 2.10
baz:
I installed 2.10 recently and noticed that the boot code "host" no longer works. It still defaults to "box".
roberts:
Works fine here.
tc@dev:~$ showbootcodes
quiet host=dev waitusb=5 cron tz=PST+8PDT,M3.2.0/2,M11.1.0/2 tce=LABEL="nettop"
baz:
Weird, these are mine:
host=tineee max_loop=255 opt=UUID=d09c23c4-ac3f-4a51-9d85-d594ed23be62 tce=UUID=d09c23c4-ac3f-4a51-9d85-d594ed23be62 home=UUID=d09c23c4-ac3f-4a51-9d85-d594ed23be62 noautologin noicons waitusb=7 quiet showapps pause
maro:
I believe I can provide an explanation: The changing of the host name is done via the 'sethostname' function in '/etc/init.d/tc-functions', which itself relies on function 'getbootparam' of the same file. In 'getbootparam' the following statement appears to be critical for the problem reported here:
stringinstring " $1=" "$CMDLINE" || return 1
I made the observation that a difference between roberts and baz test cases is the relative position of the 'host=xxx' boot parameter. In the case of roberts this appeared in the middle of $CMDLINE whilst baz had it at the beginning. Looking at the above statement it seems clear what happens here: due to the blank character in " $1=", a match is found for roberts but not for baz. I guess a simple fix would be to insert an extra blank in " $CMDLINE", that means a change to
stringinstring " $1=" " $CMDLINE" || return 1
should resolve the issue. Short term baz could just shuffle the boot parameters around and that should overcome this little problem.
Furthermore this would appear to happen to pretty much any boot parameter value extracted with 'getbootparam', where the boot parameter appears at the beginning of $CMDLINE. IIRC there might have been a previous case where a user found a difference in behaviour depending on where in $CMDLINE the parameter value appeared.
roberts:
Also easy if always use kernel specific parameters before any tinycore specific parameters, i.e., quiet first.
Navigation
[0] Message Index
[#] Next page
Go to full version