Freetz_strip_scripts

µRaCoLi

Mitglied
Mitglied seit
22 Sep 2005
Beiträge
239
Punkte für Reaktionen
0
Punkte
0
Bei FREETZ_STRIP_SCRIPTS gibt es ein Problem, dass einige Scripte nicht bearbeitet werden:

Code:
$ tools/busybox ash -n build/modified/filesystem/usr/bin/get_ip
build/modified/filesystem/usr/bin/get_ip: line 38: syntax error: you disabled math support for $((arith)) syntax

Muss das busybox anders gebaut werden?
 
weil solch ein aufruf in fwmod stattfindet. wenn es zu einem fehler kommt, dann wird diese datei nicht weiter gestript.
 
Was für ein Aufruf findet statt, zu welchem Fehler kommt es, und welche Datei wird nicht weiter gestrippt.
Deine bisherigen Äußerungen lesen sich so, als wolltest Du am liebsten alleine nach dem Fehler suchen.
 
der fehler ist ja, so denke ich, klar. tools/busybox fehlen ein paar features, um ash-code zu erkennen, und ich weiss nicht, wo die eingestellt werden...
in der fwmod ab zeile 1306:
Code:
        if [ "$FREETZ_STRIP_SCRIPTS" == "y" ]; then
                echo0 "stripping shell scripts"
                # This is (necessarily) slow because it checks *all* files
                for f in $(find ${FILESYSTEM_MOD_DIR} -type f); do
                        # Syntax check. Use ash (not bash) because on target we also have ash.
                        # This is the first step because it is faster than 'file'.
                        $BUSYBOX ash -n "$f" 2>/dev/null &&
                        # Sometimes the ash syntax check succeeds on binaries.
                        # So we need to check we really have a text file here.
                        file -b --mime-type "$f" | grep -sq '^text/' &&
                        # Only strip scripts (possibly also stuff like awk or perl) with
                        # shebang. This excludes dot-included files without shebang, but
                        # anything else would be too unsafe. We do not want plain text
                        # files stripped.
                        grep -sq '#[^!]' "$f" ||
                        # continue the loop with the next file if one of the conditions above is false
                        continue

                        # Strip ...
                        STRIP_SCRIPTS_SED_SCRIPT='/^[ \t]*$/d;'               # blank lines
                        # TODO: doesn't work because of multiline IFS definitions, i.e. IFS='\t\n'
                        #STRIP_SCRIPTS_SED_SCRIPT+='s/[ \t]+$//;'             # trailing white spaces
                        STRIP_SCRIPTS_SED_SCRIPT+='/^[ \t]*#[^!].*/d;'        # shell comments (not shebangs)
                        if [ "${f: -3:3}" != ".py" ]; then
                                STRIP_SCRIPTS_SED_SCRIPT+='s/^[ \t]*//g;'     # and indentation if it's not a python script
                        fi
                        sed -i -r "${STRIP_SCRIPTS_SED_SCRIPT}" "$f" &&
                        echo2 "${f##${FILESYSTEM_MOD_DIR}}"
                done
        fi
folgende dateien werden nicht gestrippt:
Code:
$ for f in $(find build/modified/filesystem/ -type f); do tools/busybox ash -n $f 2>&1 |grep math; done
build/modified/filesystem/usr/lib/mod/cgi/stat_bar.sh: line 22: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/mod/cgi/form.sh: line 67: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/callmonitor/modules/format.sh: line 3: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/callmonitor/modules/if_jfritz.sh: line 120: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/callmonitor/modules/reverse.sh: line 66: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/callmonitor/sipnames: line 12: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/callmonitor/applets/check.sh: line 54: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/callmonitor/actions.d/roku.sh: line 44: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/callmonitor/actions.d/config.sh: line 6: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/lib/cgi-bin/mod/box_info.cgi: line 67: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/bin/get_ip: line 38: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/bin/kernel_args: line 182: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/bin/setcountry: line 3: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/bin/modsave: line 6: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/bin/moduninstall: line 10: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/mww/cgi-bin/skin.cgi: line 24: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/usr/mww/cgi-bin/status.d/20-memory.sh: line 20: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/etc/init.d/rc.dsld: line 28: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/etc/init.d/rc.S: line 68: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/etc/init.d/rc.net: line 52: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/etc/init.d/rc.conf: line 40: syntax error: you disabled math support for $((arith)) syntax
build/modified/filesystem/sbin/check_hw: line 12: syntax error: you disabled math support for $((arith)) syntax
 
Ist der Platz wirklich so eng, dass die Shell Skripte verkleinert werden müssen?
Die Konfiguration der Host Busybox ist in tools/make/Config.busybox.
 

µRaColi, ist jetzt auf einmal deine Umschalttaste defekt??
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.