Roland Mainz wrote:
> Dave Miner wrote:
>> Roland Mainz wrote:
>>> Dave Miner wrote:
>>>> Please review the webrev at
> [snip]
>>>> -mkfile -n $USB_SIZE $USB_FILE
>>>> +# Compute size for USB image; use ISO + 20% to account for smaller block
>>>> +# size on UFS and the log. Round to nearest kbyte as lofiadm demands
>>>> +# size be a multiple of 512
>>>> +USB_SIZE=`ls -l $ISO_FILE | nawk '{print int($5 * 1.2/1024)}'`
>>> 1. Please declare "USB_SIZE" as an integer variable ("float" won't work
>>> since the script uses "bash" which makes things a bit more compliciated
>>> in this case), e.g. ...
>>> -- snip --
>>> integer USB_SIZE
>>> -- snip --
>>> (as a result the input value can only be a number and the whole thing
>>> will be a bit faster)
>>>
>>> 2. Please use shell builtin math, e.g. for "bash" it may be...
>>> -- snip --
>>> set -- $(ls -l /usr/bin/ls) ; (( USB_SIZE=( ($5 * 12)/(10*1024) + 1) ))
>>> -- snip --
>>> ... and for ksh93 it may be...
>>> -- snip --
>>> set -- $(ls -l /usr/bin/ls) ; (( USB_SIZE=( int($5 * 1.2/1024.) ) ))
>>> -- snip --
>>>
>>>> +mkfile -n ${USB_SIZE}k $USB_FILE
>>> Uhm... please use quotes around "$USB_FILE" and shell builtin math may
>>> (or may not) be better, e.g. ...
>>> -- snip --
>>> mkfile -n $(( USB_SIZE * 1024)) $USB_FILE
> ^^^^^^^^^
>
> Grumpf... I missed the quotes myself... ;-(
>
>>> -- snip --
>> Roland, thanks for taking a look. I'm going to have to defer changing
>> from this version until next week since these changes are needed
>> immediately, but we'll come back to it without the deadline pressure
>
> Ok... ;-/
> ... could you please file a bug and assign it to me and put yourself
> into the CC: field (or assign it to you and put me into the CC: field) ?
> I can make a "blind patch" (e.g. just cleanup the syntax&co.) quite
> easily within ~~30mins but need someone who does the check-in stuff ...
>
I've filed 1462. Joe VLcek is assigned from the team to work on this
with you.
Thanks,
Dave