From 5766b9a8d6fb861e6e4f72caec53a1e48fd82cb2 Mon Sep 17 00:00:00 2001
From: zimoch <zimoch>
Date: Mon, 3 May 2004 12:48:57 +0000
Subject: [PATCH] extract ARCH from last directory component of VXWORKS Fix
 output format of IP addr from %-13s to %-15s

---
 App/scripts/bootinfo | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/App/scripts/bootinfo b/App/scripts/bootinfo
index bd94504b..3a1dd56a 100755
--- a/App/scripts/bootinfo
+++ b/App/scripts/bootinfo
@@ -2,7 +2,7 @@
 #
 '''
   $Source: /cvs/G/DRV/misc/App/scripts/bootinfo,v $
-  $Revision: 1.2 $   $Date: 2004/04/19 11:59:29 $
+  $Revision: 1.3 $   $Date: 2004/05/03 12:48:57 $
 
   Obtain boot information about IOCs from the ssrm_public Oracle
   database and make a pretty printout.
@@ -91,7 +91,7 @@ if __name__ == "__main__":
         ufo.close ()
         if hdrNotDone:
           toks = string.split (lines[0])
-          print "\n%-16s %-11s %-8s %-8s %-6s %-8s %-8s %-13s %s" % \
+          print "\n%-16s %-11s %-8s %-8s %-6s %-8s %-8s %-15s %s" % \
             (toks[0], toks[1], toks[2], toks[3], toks[4], toks[5], toks[6], toks[7], toks[8])
           hdrNotDone = 0
         else:
@@ -101,15 +101,12 @@ if __name__ == "__main__":
           nFnd = nFnd + 1
           toks = string.split (line)
           if len (toks) >= 9:
-            archBase = os.path.join (toks[4], "epics/base/bin/")
-            archBaseLen = len (archBase)
-            if toks[8][0:archBaseLen] == archBase:
-              toks[8] = toks[8][archBaseLen:]
+            toks[8] = os.path.basename(os.path.dirname (toks[8]))
             #endif
             if toks[8][-8:] == "/vxWorks": toks[8] = toks[8][0:-8]
             date = time.strptime ("%s %s" % (toks[1], toks[2]), "%d-%m-%Y %H:%M:%S")
             dateStr = time.strftime ("%d-%b-%Y %H:%M:%S", date)
-            print "%-16s %s %-8s %-7s %-8s %-8s %-13s %s" % \
+            print "%-16s %s %-8s %-7s %-8s %-8s %-15s %s" % \
               (toks[0], dateStr, toks[3], toks[4], toks[5], toks[6], toks[7], toks[8])
           #endif
         #endfor
-- 
GitLab