head -c geht leider nicht

  • Hallo,


    wie kann man es ermöglichen, den busybox-Befehl head mit der Option -c auf der DM7000 lauffähig zu machen?
    Auf der DM7020 - auch mit neuestem Enigma1 geht das.

    DM7000 - 80GB-HDD - 1GB-USB-Stick - 100Mbit-LAN
    DM600 - 20GB-HDD - 100Mbit-LAN

  • Gibt es den Parameter -c auf der DM7000 Version nicht oder
    meckert der Befehl anderweitig rum?


    Im schlimmsten Fall müsstest Du die Textutils von gnu.org selbst für die DM7000 kompilieren...

  • Hi,


    anbei die auf Basis der aktuellen GNU core utils kompilierten "head" und "tail".


    Versuchs mal damit. Hoffe, wir haben nicht wieder das Problem mit der libc.


    root@dm7020:/media/hdd/temp# ./head --help
    Usage: ./head [OPTION]... [FILE]...
    Print the first 10 lines of each FILE to standard output.
    With more than one FILE, precede each with a header giving the file name.
    With no FILE, or when FILE is -, read standard input.


    Mandatory arguments to long options are mandatory for short options too.
    -c, --bytes=[-]N print the first N bytes of each file;
    with the leading `-', print all but the last
    N bytes of each file
    -n, --lines=[-]N print the first N lines instead of the first 10;
    with the leading `-', print all but the last
    N lines of each file
    -q, --quiet, --silent never print headers giving file names
    -v, --verbose always print headers giving file names
    --help display this help and exit
    --version output version information and exit


    N may have a multiplier suffix: b 512, k 1024, m 1024*1024.


    Report bugs to <bug-coreutils@gnu.org>.
    root@dm7020:/media/hdd/temp#

  • Das head alleine reicht leider nicht aus, die 7000er nimmt es nicht, selbst wenn man es ihr direkt ins verzeichnis legt, von der aus ein anderes script ausgeführt wird. und beim expliziten Ansprechen meckert es trotzdem noch rum (hatte hier head mal direkt in var gelegt - gleicher fehler aber auch in var/bin):


    /var > head -c
    head: invalid option -- c
    BusyBox v1.01 (2006.08.19-02:16+0000) multi-call binary


    Usage: head [OPTION]... [FILE]...


    /var > ./head -c
    ./head: option requires an argument -- c
    Try `./head --help' for more information.
    ./head: relocation error: ./head: symbol __fpending, version GLIBC_2.2 not defin
    ed in file libc.so.6 with link time reference
    /var >


    Die 7000er spricht immer von einer GLIB_2.2, während die 7020er die GLIB_2.3.4 verwendet.
    Ich denke, hier muss direkt die andere Busybox ins var/bin mit allem was dazugehört... zse, zse, zse...

    DM7000 - 80GB-HDD - 1GB-USB-Stick - 100Mbit-LAN
    DM600 - 20GB-HDD - 100Mbit-LAN

    Einmal editiert, zuletzt von card0384 ()

  • Hi,


    >>/var > ./head -c
    >>./head: option requires an argument -- c
    >>Try `./head --help' for more information.


    Das ist doch genau, was du willst!


    Gruß Mamba

    __________________________________
    Dreambox 800/7020, 250 GB HDD, 100 Mbit Lan

  • stimmt, aber es gibt danach trotzdem jedes mal noch die Fehlermeldung aus - schau mal im anderen Board...


    Gibts jemanden, der die gesamte Busybox neu Kompilieren kann auf Basis GLIBC 2.3.4? Ich hab genug Platz in meinem Var - der liegt aufm USB - das reicht Dicke fürn paar Versuche - da werden wohl etliche Dateien notwendig sein...

    DM7000 - 80GB-HDD - 1GB-USB-Stick - 100Mbit-LAN
    DM600 - 20GB-HDD - 100Mbit-LAN

    Einmal editiert, zuletzt von card0384 ()

  • kamikazemike
    Ey Klasse - das head läuft - prima Arbeit
    2 Sachen:
    1. bekommste das für tail und für echo (wird lt. mamba gebraucht) auch hin?
    2. wie kann ich erreichen, daß ich irgendwo nur head eingebe und er die neue Version nimmt und nicht die alte. Derzeit gehts nur, wenn ich explizit z.B. var/bin/head -c eingebe. Selbst im var/bin-Ordner muss ich ./head eingeben - wenn ich nur head mache, nimmt er selbst dort das alte - gibts da ein paar variablen, die ich z.B. in der init setzen kann?

    DM7000 - 80GB-HDD - 1GB-USB-Stick - 100Mbit-LAN
    DM600 - 20GB-HDD - 100Mbit-LAN

  • Warte noch ein paar Stunden. Werde gleich dream_motion v0.5 posten. Das nimmt dann automatisch das head, welche sich im bin-dir unter dem dream_motion dir liegt.


    Das tail und echo statisch zu bauen ist kein Problem. Bin gespannt, wie schnell das ganze Zeugs dann noch laeuft. Die binaries werden ca. 8x so groß sein, als normal.


    Aber wurscht ... hauptsache es tut schon mal. :smiling_face:


    Gruß Mamba

    __________________________________
    Dreambox 800/7020, 250 GB HDD, 100 Mbit Lan

  • hi mamba,
    was soll ich sagen - die macken werden weniger - ich brauch wohl noch ein icmp von dir :face_with_tongue:


    /var > ./dream_motion
    [: unknown operand
    [: 0: unknown operand



    dream-motion script v0.5 by mamba0815@gmx.li, public domain


    ip-cam IP address: 192.168.1.251
    ip-cam user-ID: root
    ip-cam password: admin
    tv output: on
    logging: on
    motion alarms saved: ./log/jpg/dream_motion_alarmX.jpg
    ------------------------------------------------------------
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    * icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    * icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    * icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    * icmp_current: [: -lt: argument expected
    bin/icmp: unexpected EOF while reading image file '/tmp/dream_still.bmp'
    bin/icmp: use -h option for help
    [: .: unknown operand
    icmp_current: [: -lt: argument expected


    /var >

    DM7000 - 80GB-HDD - 1GB-USB-Stick - 100Mbit-LAN
    DM600 - 20GB-HDD - 100Mbit-LAN

  • Warte, ich packe dir das gesamte als static-package auf das andere Board. Stell die Bildgröße im camspy auf 640x480, dann sollte der Fehler weg sein, da er auf zu kleine Bilder hinweist. Anscheinend hast du auch "login=1" gesetzt? tcp_port auf 80?
    Gruß Mamba

    __________________________________
    Dreambox 800/7020, 250 GB HDD, 100 Mbit Lan

    5 Mal editiert, zuletzt von mamba0815 ()

  • Zitat

    Original von card0384
    2. wie kann ich erreichen, daß ich irgendwo nur head eingebe und er die neue Version nimmt und nicht die alte. Derzeit gehts nur, wenn ich explizit z.B. var/bin/head -c eingebe.


    Versuche mal die Datei /etc/profile zu editieren und dort dann die PATH Variable. Einfach das Verzeichnis mit den neuen Binaries vor dem anderen Gerempel mit Doppelpunkt abtrennen und gut ist. Dann sollte es gehen.


    Sers,
    Andy