| 1 | = Tools = |
| 2 | == Busybox == |
| 3 | There are certain differences between the normal Linux commands and those provided by BusyBox. This also needs to be taken in account by mondo. |
| 4 | |
| 5 | * Busybox ps doesn't take options (solved in rev [792]) |
| 6 | * Output format for Busybox ps and normal ps auxww are different (especially process ID and user are inverted): |
| 7 | {{{ |
| 8 | #/usr/lib/mindi/rootfs/bin/busybox ps |
| 9 | PID Uid VmSize Stat Command |
| 10 | [...] |
| 11 | 2105 root SW< [ac97/0] |
| 12 | 2113 haldaemo 7336 S hald |
| 13 | 2114 root 1200 S hald-runner |
| 14 | 2234 haldaemo 820 S /usr/lib/hald-addon-keyboard |
| 15 | 2284 root 444 S /sbin/ifplugd -b -i eth0 |
| 16 | 2299 haldaemo 804 S /usr/lib/hald-addon-acpi |
| 17 | 2327 root 908 S /usr/lib/hald-addon-storage |
| 18 | 2330 root 840 S /usr/lib/hald-addon-storage |
| 19 | 2401 root 5776 S python ./hpssd.py |
| 20 | 2575 rpc 412 S portmap |
| 21 | 2617 root 33432 S pcscd |
| 22 | # ps auxww |
| 23 | USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND |
| 24 | [...] |
| 25 | root 2105 0.0 0.0 0 0 ? S< Oct29 0:00 [ac97/0] |
| 26 | 88 2113 0.0 0.4 9540 7336 ? Ss Oct29 0:02 hald |
| 27 | root 2114 0.0 0.0 3200 1200 ? S Oct29 0:00 hald-runner |
| 28 | 88 2234 0.0 0.0 2556 820 ? S Oct29 0:00 /usr/lib/hald-addon-keyboard |
| 29 | root 2284 0.0 0.0 1596 444 ? Ss Oct29 0:00 /sbin/ifplugd -b -i eth0 |
| 30 | 88 2299 0.0 0.0 2560 804 ? S Oct29 0:00 /usr/lib/hald-addon-acpi |
| 31 | root 2327 0.0 0.0 2136 908 ? S Oct29 0:01 /usr/lib/hald-addon-storage |
| 32 | root 2330 0.0 0.0 2140 840 ? S Oct29 0:09 /usr/lib/hald-addon-storage |
| 33 | root 2401 0.0 0.3 10896 5776 ? S Oct29 0:01 python ./hpssd.py |
| 34 | rpc 2575 0.0 0.0 1864 412 ? Ss Oct29 0:00 portmap |
| 35 | root 2617 0.0 2.1 34620 33432 ? Ss Oct29 0:00 pcscd |
| 36 | }}} |
| 37 | * Busybox grep doesn't support the -w option (fixed in rev [909]) |
| 38 | {{{ |
| 39 | ./mondo/src/mondorestore/mondo-rstr-tools.c: |
| 40 | "mount | grep -w %s | tail -n1 | cut -d' ' -f3", |
| 41 | ./mondo/src/common/libmondo-devices.c: sprintf(tmp, "%s | grep -w \"%s\" > /dev/null 2> /dev/null", |
| 42 | ./mondo/src/common/libmondo-tools.c: sprintf(command, "mount | grep -w %s | tail -n1 | cut -d' ' -f3", |
| 43 | ./mondo/src/common/libmondo-tools.c: ("mount | grep -w vfat | grep -vE \"/dev/fd|nexdisk\"", 0) |
| 44 | ./mondo/src/common/libmondo-tools.c: ("mount | grep -w dos | grep -vE \"/dev/fd|nexdisk\"", 0)) { |
| 45 | ./mondo/src/common/libmondo-tools.c: "grep -v \":\" /etc/fstab | grep -vx \"#.*\" | grep -w \"/boot\" | tr -s ' ' '\t' | cut -f1 | head -n1"); |
| 46 | ./mondo/src/common/libmondo-tools.c: sprintf(command, "mount| grep -w \"%s\"", tmp); |
| 47 | ./mondo/src/common/libmondo-tools.c: ("ps ax | grep -w magicdev |grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99")); |
| 48 | }}} |
| 49 | * Busybox grep doesn't support the -x option (fixed in rev [910]) |