hosts file

Joined
Aug 11, 2008
Messages
4
Reaction score
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?
 
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.
 
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>
 
Back
Top