Tiny Core Linux

Tiny Core Base => Micro Core => Topic started by: sosjozsef on December 29, 2011, 10:14:29 PM

Title: [Solved] hosts
Post by: sosjozsef on December 29, 2011, 10:14:29 PM
Sorry, I speak a little English.

The /opt/.filetool.lst file last line is:

etc/hosts

Run: filetool.sh -b

Reboot. Not saved (backup) /etc/hosts file. Why?
Title: Re: hosts
Post by: bmarkus on December 30, 2011, 01:38:30 AM
Which MC version?
Title: Re: hosts
Post by: curaga on December 30, 2011, 02:59:49 AM
See /opt/bootsync.sh and /usr/bin/sethostname.
Title: Re: hosts
Post by: sosjozsef on December 30, 2011, 04:21:01 AM
Which MC version?
The Core Project Version 4.2
Title: Re: hosts
Post by: sosjozsef on January 01, 2012, 01:04:23 PM
See /opt/bootsync.sh and /usr/bin/sethostname.

hosts:
Code: [Select]
127.0.0.1 box localhost
bootsync.sh:
Code: [Select]
/usr/bin/sethostname box
/usr/bin/sethostname sos

Reboot.

Code: [Select]
tc@sos
hosts:
Code: [Select]
127.0.0.1 sos localhost
I would like hosts file after reboot:

Code: [Select]
127.0.0.1 box
127.0.0.1 sos
Title: Re: hosts
Post by: bmarkus on January 01, 2012, 01:15:27 PM
Overwrite at boot? One line in bootlocal.sh
Title: Re: hosts
Post by: sosjozsef on January 01, 2012, 01:27:35 PM
Overwrite at boot? One line in bootlocal.sh

The bootlocal.sh is empty and the bootsync.sh is:

Code: [Select]
/usr/bin/sethostname box
/usr/bin/sethostname sos
...

My hosts file is:

Code: [Select]
127.0.0.1 sos localhost
I would like:

Code: [Select]
127.0.0.1 box localhost
127.0.0.1 sos localhost

Need Apache Virtual Host.
Title: Re: hosts
Post by: sosjozsef on January 01, 2012, 04:59:10 PM
Solved.

/opt/bootlocal.sh:

Code: [Select]
cp -f /home/tc/.hosts /etc/hosts
/home/tc/.local/bin/re:

Code: [Select]
cp -f /etc/hosts /home/tc/.hosts
filetool.sh -b
sudo reboot