Bug 3079

Summary: df wraps lines
Product: Busybox Reporter: wellumies
Component: OtherAssignee: unassigned
Status: RESOLVED INVALID    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:

Description wellumies 2011-01-14 11:45:47 UTC
I tried all binaries from http://www.busybox.net/downloads/binaries

and df wraps lines on every one of the busybox-mipsel versions

This breaks almost all my init scripts 

Now I'm forced to use a version by Asus that has broken Awk...

I could compile myself, but this would require a working cross-compile environment and so far I'm unable to find one for Asus O'Play realtek board :(

1.18.0 wraps right after the /dev/scsi/host3/bus0/target0/lun1/part1

/etc/init.d # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root               122880    101008     21872  82% /
/dev/mtdblock/2          40960      2272     38688   6% /usr/local/etc
/dev/rd/0                   40        40         0 100% /mnt/rd
/dev/scsi/host3/bus0/target0/lun1/part1   3953036    433832   3318396  12% /tmp/usbmounts/sdb1
/dev/scsi/host3/bus0/target0/lun1/part2   3747580    816964   2740248  23% /tmp/usbmounts/sdb2


/etc/init.d # /bin/busybox-mipsel df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root               122880    101008     21872  82% /
/dev/mtdblock/2          40960      2272     38688   6% /usr/local/etc
/dev/rd/0                   40        40         0 100% /mnt/rd
/dev/scsi/host3/bus0/target0/lun1/part1
                       3953036    433832   3318396  12% /tmp/usbmounts/sdb1
/dev/scsi/host3/bus0/target0/lun1/part2
                       3747580    816964   2740248  23% /tmp/usbmounts/sdb2
/etc/init.d #
Comment 1 Denys Vlasenko 2011-01-16 00:55:24 UTC
> and df wraps lines on every one of the busybox-mipsel versions
> 
> This breaks almost all my init scripts 
> 
> Now I'm forced to use a version by Asus that has broken Awk...
> 
> I could compile myself, but this would require a working cross-compile
> environment and so far I'm unable to find one for Asus O'Play realtek board :(
> 
> 1.18.0 wraps right after the /dev/scsi/host3/bus0/target0/lun1/part1
> 
> /etc/init.d # df
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/root               122880    101008     21872  82% /
> /dev/mtdblock/2          40960      2272     38688   6% /usr/local/etc
> /dev/rd/0                   40        40         0 100% /mnt/rd
> /dev/scsi/host3/bus0/target0/lun1/part1   3953036    433832   3318396  12%
> /tmp/usbmounts/sdb1
> /dev/scsi/host3/bus0/target0/lun1/part2   3747580    816964   2740248  23%
> /tmp/usbmounts/sdb2

df from GNU coreutils 8.4 does the same. We are trying to be compatible.

You can re-concatenate the lines. For example, this way:

df | sed -e :a -e 'N; s/\n //g; ba'