aboutsummaryrefslogtreecommitdiff
path: root/tools/etc/rc.local
diff options
context:
space:
mode:
authorcassio <cassiopc@gmail.com>2013-07-02 05:46:45 +0000
committercassio <cassiopc@gmail.com>2013-07-02 05:46:45 +0000
commitbe2491b093b1f0ca430bede679ecbb670041e483 (patch)
treefe2da63d1811cb93e4352a43a113ace37b9f6017 /tools/etc/rc.local
parenta9aa438ea0558eb0044cf1e54a9190ddb41b65e5 (diff)
downloadboca-be2491b093b1f0ca430bede679ecbb670041e483.tar.gz
boca-be2491b093b1f0ca430bede679ecbb670041e483.zip
restructuring of boca's git
Diffstat (limited to 'tools/etc/rc.local')
-rwxr-xr-xtools/etc/rc.local34
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/etc/rc.local b/tools/etc/rc.local
new file mode 100755
index 0000000..2b0fff8
--- /dev/null
+++ b/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