problem with file /etc/hosts after reboot

Home Page Forums Network Management ZeroShell problem with file /etc/hosts after reboot

This topic contains 0 replies, has 0 voices, and was last updated by  biga 6 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43436

    biga
    Member

    Hi i am a new user of zeroshell, and i have a big problem.
    When i reboot the file /etc/hosts the file lost my entry.
    I must edit the file hosts because i solve the name that non implemented in the dns like this
    (an exalmple ip) (host name)
    90.8.23.12 http://www.mytest.it
    242.243.234.234 http://www.mystes2.com
    after reboot the system the file lost this line

    How to add this entry in the file after reboot the system?

    Thanks for your help.

    #52452

    knura
    Member

    @biga wrote:

    When i reboot the file /etc/hosts the file lost my entry.
    I must edit the file hosts because i solve the name that non implemented in the dns like this
    (an exalmple ip) (host name)
    90.8.23.12 http://www.mytest.it
    242.243.234.234 http://www.mystes2.com
    after reboot the system the file lost this line

    How to add this entry in the file after reboot the system?

    The “root” file system is created in a ram disk; it is created afresh when you boot ZS. Therefore your /etc/hosts will be overwritten with the ZS default, in the next boot.

    For persistence, you can create a file, with the “extra” entries to your requirements, somewhere in the third partition (the DB partition) and you can link /etc/hosts to it using a post boot script. Make sure that you copy over ZS’s entries into this file as well, for it’s own operation!


    rm /etc/hosts
    ln -sf /DB/path/name/to/my.etc.hosts /etc/hosts

    In the Web UI:
    System>Setup>Startup/Cron

    HTH,
    — Arun Khan

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.