Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r117 - trunk/scripts/admin/test_server

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r117 - trunk/scripts/admin/test_server


Chronological Thread 
  • From: "Apache" <apache AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r117 - trunk/scripts/admin/test_server
  • Date: Tue, 3 Jun 2008 10:47:18 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: huebner AT PSI.CH
Date: Tue Jun 3 10:47:18 2008
New Revision: 117

Log:
Added a script to enter the IP address and the hostname into /etc/hosts

Added:
trunk/scripts/admin/test_server/changeEtcHosts.sh (contents, props
changed)

Added: trunk/scripts/admin/test_server/changeEtcHosts.sh
==============================================================================
--- (empty file)
+++ trunk/scripts/admin/test_server/changeEtcHosts.sh Tue Jun 3 10:47:18
2008
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+IPADD=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 |
awk '{ print $1}')
+HOSTN=$(hostname)
+
+echo $IPADD $HOSTN
+
+
+grep -qs $HOSTN /etc/hosts && sed -i 's/^.*\<'$HOSTN'\>.*$/'$IPADD'
'$HOSTN'/' /etc/hosts || echo "$IPADD $HOSTN" >> /etc/hosts
\ No newline at end of file



  • [idok-commit] idok commit r117 - trunk/scripts/admin/test_server, Apache, 06/03/2008

Archive powered by MHonArc 2.6.19.

Top of Page