hosts file

Discussion in 'Linux' started by giav, Aug 11, 2008.

  1. giav

    giav

    Joined:
    Aug 11, 2008
    Messages:
    4
    Likes Received:
    0
    After setting up the hosts file with my own entries (twice) it seems that it gets reset on reboot.
    Anyone know why &/or how I can set some permanent values?
     
    giav, Aug 11, 2008
    #1
  2. giav

    jukk

    Joined:
    Jul 31, 2008
    Messages:
    54
    Likes Received:
    0
    Why: because the linpus distro on the Acer Aspire One has some customized startup scripts.

    If you really want to change it, you have to do it by scripting for instance in /etc/rc.d/rc.local (overwriting the current hosts file with your own copy). I haven't tried this, though.
     
    jukk, Aug 12, 2008
    #2
  3. giav

    giav

    Joined:
    Aug 11, 2008
    Messages:
    4
    Likes Received:
    0
    Thanks!!

    rc.local works fine
     
    giav, Aug 12, 2008
    #3
  4. giav

    enildeR

    Joined:
    Jul 30, 2008
    Messages:
    23
    Likes Received:
    0
    Yeah, they have the commands in /etc/rc.d/rc.5
    It writes a new one on every boot. I commented out the lines:
    Code:
    # Set the hostname.
    linpus_host="`cat /etc/sysconfig/network | grep HOSTNAME | cut -d "=" -f2`"
    #echo "127.0.0.1        localhost       localhost
    #127.0.0.1      ${linpus_host}  ${linpus_host}
    #" > /etc/hosts
    echo ${linpus_host} > /etc/HOSTNAME
    /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
    
    I modified the file to my own liking, and now. Its rather lame, because every time you boot up, that file is modified. SSD drive. All flash memory die after a given amount of writes to the system. There's a lot about their linpus install that kinda sucks in regards to having a SSD. There are still a lot of writing to files in /var/log/. I landed up making that a tmpfs mount.
    Acer was smart enough to make /tmp tmpfs, but could have really done bettAR.

    Like the home directory being used by the left-side SD slot. That's nice, and if the card ever dies from too many writes, I can replace it. However, the way they implemented it, mount.posixovl eats up a lot of CPU when stuff in your home dir is being accessed/written to often. :(

    Bleh. </rant>
     
    enildeR, Aug 12, 2008
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.