From 2948fe8d6055f6dfe6289e64bce426b5e0bb552f Mon Sep 17 00:00:00 2001 From: cassiopc Date: Fri, 31 Aug 2012 11:02:27 +0200 Subject: inclusion of dir 1.5.1 for boca --- boca-1.5.1/tools/etc/rc.local | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 boca-1.5.1/tools/etc/rc.local (limited to 'boca-1.5.1/tools/etc/rc.local') diff --git a/boca-1.5.1/tools/etc/rc.local b/boca-1.5.1/tools/etc/rc.local new file mode 100755 index 0000000..2b0fff8 --- /dev/null +++ b/boca-1.5.1/tools/etc/rc.local @@ -0,0 +1,34 @@ +#!/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 "143.107.255.15.*ntp.usp.br.*ntp.usp.br" /etc/hosts +if [ $? != 0 ]; then + echo "143.107.255.15 ntp.usp.br ntp.usp.br" >> /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 ntp.usp.br +ntpdate -u ntp.usp.br +exit 0 -- cgit v1.2.3