From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Iain Barker Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Automate patchkit baselining? Date: Wed, 18 Jun 2003 09:45:45 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: main.gmane.org 1055945520 17960 80.91.224.249 (18 Jun 2003 14:12:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 18 Jun 2003 14:12:00 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Wed Jun 18 16:11:56 2003 Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 19SdTy-0003PJ-00 for ; Wed, 18 Jun 2003 16:00:14 +0200 Original-Received: (qmail 6415 invoked by uid 5); 18 Jun 2003 14:00:08 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 6406 invoked by uid 49493); 18 Jun 2003 14:00:08 -0000 Original-Received: from ibarker@aastra.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-1.9/5.0):. Processed in 0.425958 secs); 18 Jun 2003 14:00:08 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 18 Jun 2003 14:00:07 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HGO0071MK819K@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 18 Jun 2003 10:00:04 -0400 (EDT) Original-Received: from mail.aastra.com (mail.aastra.com [216.94.98.95]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HGO009KEK7VNI@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 18 Jun 2003 09:59:56 -0400 (EDT) Original-Received: by mail.aastra.com with Internet Mail Service (5.5.2653.19) id ; Wed, 18 Jun 2003 09:57:42 -0400 Content-return: allowed Original-To: "'tru64-unix-managers@ornl.gov'" X-Mailer: Internet Mail Service (5.5.2653.19) Xref: main.gmane.org gmane.os.tru64.managers:4587 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:4587 Thanks to Michael Butow for the offer of his scripts to use as a basis, and the recommendation to use cygnus precompiled expect binaries for Tru64. I was already well into burning the midnight oil on this and managed to hack up a script - I won't claim it is elegant or very robust against errors, but it serves the needs for me to upgrade our systems in a one stop automated script, so it is 'good enough' for us. The only really trick part is the syntax for regex matching, which took a few iterations to get right. Anyway, for future reference by anyone who is interested, the script is below. Note also I am running Tru64 4.0f and located an old binary version of the expect package on an early copy of the HP open source software collection. The script is simple enough not to need a later version. thanks. - Iain # Enough for 60 mins of patching activity set timeout 3600 match_max 100000 spawn /var/tmp/patch_kit/dupatch expect "Enter path to the top of the patch distribution" send -- "/var/tmp/patch_kit\r" expect "5) Patch Baseline Analysis/Adjustment" expect "Enter your choice:" send -- "5\r" expect { "Press RETURN to get back to the Main Menu" { send -- "\r" } "Press ENTER" { send -- "\r" ; exp_continue } "Press " { send -- "\r" ; exp_continue } "Press " { send -- "\r" ; exp_continue } "Press RETURN" { send -- "\r" ; exp_continue } "Do you want to" { send -- "y\r" ; exp_continue } "Is this correct" { send -- "y\r" ; exp_continue } -re "(.*)\n (.*)\\) ALL of the above(.*)" { send $expect_out(2,string) ; send -- "\r" ; exp_continue } timeout { exit 1 } eof { exit 1 } } expect "q) Quit" expect "Enter your choice:" send -- "q\r" wait exit 0 -----Original Message----- From: Iain Barker Sent: Tuesday, 17 June, 2003 18:33 To: tru64-unix-managers@ornl.gov Subject: Automate patchkit baselining? Does anyone know a method to automate patchkit baselining using dupatch? I want to be able to remove all current patches, baseline the system using dupatch, then apply a new patch set automatically via a script. I can do the dupatch remove via a script in single user mode. And I can apply the new patches using the command line options of dupatch. But it appears that baselining is a manual process, chosing 'All of the above' for the menu. Anybody tried something like this using expect? thanks. Iain Barker