.titleBar { margin-bottom: 5px!important; }

Edit menu webinterface

Dieses Thema im Forum "FRITZ!Box Fon: Modifikationen" wurde erstellt von Fritsy, 3 Nov. 2008.

  1. Fritsy

    Fritsy Neuer User

    Registriert seit:
    3 Nov. 2008
    Beiträge:
    21
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    Hello,

    I would like to edit the menu structure of the webinterface of the Fritz!Box 7170.
    When i edit a file in the /usr/www/avme/en/html/ directory i get an errormessage: File is read only

    How can i edit these files or change the file permissions?

    Thanks in advance! :)
     
  2. MaxMuster

    MaxMuster IPPF-Promi

    Registriert seit:
    1 Feb. 2005
    Beiträge:
    6,919
    Zustimmungen:
    0
    Punkte für Erfolge:
    36
    As you just learned ;-): All files are stored in a read-only flash filesystem. Yon can not directly alter them.
    Nevertheless there are two possible ways to change the pages:
    First you can copy a page into the "RAM disk" of the box, change the file and mount it over the existing page e.g.:
    Code:
    cp /usr/www/avme/en/html/index.html /var/tmp/
    mount -o bind /var/tmp/index.html /usr/www/avme/en/html/index.html
    # now you may edit /var/tmp/index.html and you will see the result in /usr/www/avme/en/html/index.html
    # you can also load prepared pages or even directories to the box and then mount them over existing ones
    
    You may make these changes "semi permanent" by putting the necessary steps in the script /var/flash/debug.cfg.

    The second possibility is to do permanent changes to the HTML pages by generating a modified firmware with the changed pages (e.g. with "freetz").

    Jöerg
     
  3. Joe_57

    Joe_57 IPPF-Promi

    Registriert seit:
    5 März 2006
    Beiträge:
    4,744
    Zustimmungen:
    32
    Punkte für Erfolge:
    48
    #3 Joe_57, 3 Nov. 2008
    Zuletzt bearbeitet: 4 Nov. 2008
    Hi Fritsy!

    by using the followig commands you can determine the correct locations for the files used by the web interface:
    Code:
    cd /usr/www/html/html
    pwd
    This will show the path depending on the branding of the box.
    Therefor I woud prefer using the following command to place a copy of the desired file to the tmp directory. :rolleyes:
    Code:
    cat /usr/www/html/html/index.html > /var/tmp/indes.html
    Joe
     
  4. Fritsy

    Fritsy Neuer User

    Registriert seit:
    3 Nov. 2008
    Beiträge:
    21
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    Thanks, i tried to copy, edit and mount the files and that sort of worked but it would be a lot better if i could create a complete firmware image that contains the changed pages.
    I installed freetz but that doesn't do the trick for me. Is there an easier (or better) way to create the firmware image?
     
  5. MaxMuster

    MaxMuster IPPF-Promi

    Registriert seit:
    1 Feb. 2005
    Beiträge:
    6,919
    Zustimmungen:
    0
    Punkte für Erfolge:
    36
    You can use freetz just to modify your image, as described in [How-To] Manuell Firmware entpacken, modifizieren, packen in german but I think should be straight forward.

    Unpack your image with
    Code:
    ./fwmod -u -d <unpacked_folder> <original FRITZ.Box.image>
    
    Modify the pages in "<unpacked_folder>/original/filesystem "

    repack your new firmware with

    Code:
    ./fwmod -p -d <unpacked_folder> <original FRITZ.Box.image>
    
    (yes, you will need the original firmware file name again, just a small drawback)

    If you need to do this again, you must remove the "modified" folder before packing a new firmware or do your changes there instead....

    Hope this helps.


    Jörg