aboutsummaryrefslogtreecommitdiff
path: root/tools/etc/rc.local
blob: d6e943b0609d2c189c06ba6bf8b758bcadde0671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

if [ -x /etc/icpc/doclean.sh ]; then
  /etc/icpc/doclean.sh
fi

grep -iq "iface.*eth0" /etc/network/interfaces
if [ $? != 0 ]; then
  echo "auto eth0" >> /etc/network/interfaces
  echo "iface eth0 inet dhcp" >> /etc/network/interfaces
fi

grep -q "50.116.19.221.*www.bombonera.org.*www.bombonera.org" /etc/hosts
if [ $? != 0 ]; then
  echo "50.116.19.221 www.bombonera.org www.bombonera.org" >> /etc/hosts
fi 
grep -q "143.107.45.22.*www.ime.usp.br.*www.ime.usp.br" /etc/hosts
if [ $? != 0 ]; then
  echo "143.107.45.22 www.ime.usp.br www.ime.usp.br" >> /etc/hosts
fi 

ntpdate -u 198.60.22.240
ntpdate -u 104.232.3.3
exit 0