WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] hosts  (Read 6038 times)

sosjozsef

  • Guest
[Solved] hosts
« 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?
« Last Edit: January 01, 2012, 05:00:02 PM by sosjozsef »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: hosts
« Reply #1 on: December 30, 2011, 01:38:30 AM »
Which MC version?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: hosts
« Reply #2 on: December 30, 2011, 02:59:49 AM »
See /opt/bootsync.sh and /usr/bin/sethostname.
The only barriers that can stop you are the ones you create yourself.

sosjozsef

  • Guest
Re: hosts
« Reply #3 on: December 30, 2011, 04:21:01 AM »
Which MC version?
The Core Project Version 4.2

sosjozsef

  • Guest
Re: hosts
« Reply #4 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

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: hosts
« Reply #5 on: January 01, 2012, 01:15:27 PM »
Overwrite at boot? One line in bootlocal.sh
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

sosjozsef

  • Guest
Re: hosts
« Reply #6 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.

sosjozsef

  • Guest
Re: hosts
« Reply #7 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