WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

sosjozsef

  • Guest
[Solved] hosts
« on: December 29, 2011, 07: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, 02:00:02 PM by sosjozsef »

Offline bmarkus

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

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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
Re: hosts
« Reply #2 on: December 29, 2011, 11:59:49 PM »
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, 01:21:01 AM »
Which MC version?
The Core Project Version 4.2

sosjozsef

  • Guest
Re: hosts
« Reply #4 on: January 01, 2012, 10:04:23 AM »
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: 4572
    • My Community Forum
Re: hosts
« Reply #5 on: January 01, 2012, 10:15:27 AM »
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, 10:27:35 AM »
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, 01: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