<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Script Help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723259#M63565</link>
    <description>Ok, Still dealing with this dat auto loader issue. I was told to go to this link and use this script in conjunction with my fbackup -y command. I still am not sure how I do this. Do I start the fbackup command on 1st line and then append this script? Can someone please advise?&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;####################&lt;BR /&gt;# chgvol for autoloaders&lt;BR /&gt;# Revision 1.0&lt;BR /&gt;# Date: 12/21/99&lt;BR /&gt;# Author: James Kirkland / jtk@atl.hp.com&lt;BR /&gt;# Purpose: To allow fbackup to work with autoloaders&lt;BR /&gt;# NOTE! This script is not supported by HP.  It is provided as an example only!!&lt;BR /&gt;####################&lt;BR /&gt;&lt;BR /&gt;# Setting up variables&lt;BR /&gt;&lt;BR /&gt;TMPDIR=/var/tmp&lt;BR /&gt;RTDIR=/var/adm/chgvol&lt;BR /&gt;SES_FILE=$RTDIR/session&lt;BR /&gt;NUM=$TMPDIR/chg_num.tmp&lt;BR /&gt;PICKER=/dev/picker # device file for the robotic arm&lt;BR /&gt;&lt;BR /&gt;#scripting&lt;BR /&gt;&lt;BR /&gt;get_current_pid(){&lt;BR /&gt;NOW_PID=`ps -ef |grep fbackup |grep -v grep | cut -c 10-16`&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;is_sess_old (){&lt;BR /&gt;S_PID=`tail -1 $SES_FILE`&lt;BR /&gt;get_current_pid&lt;BR /&gt;if [ $NOW_PID -eq $S_PID ]&lt;BR /&gt;then&lt;BR /&gt; echo "Continuing with current session from fbackup PID $S_PID"&lt;BR /&gt;else&lt;BR /&gt; echo "This is the first tape change for fbackup PID $NOW_PID"&lt;BR /&gt; echo $NOW_PID &amp;gt; $SES_FILE&lt;BR /&gt; init_num&lt;BR /&gt;fi&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;init_num() {&lt;BR /&gt;echo "1" &amp;gt; $NUM&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if [ -a $SES_FILE ]&lt;BR /&gt;then&lt;BR /&gt; is_sess_old&lt;BR /&gt;else&lt;BR /&gt; touch $SES_FILE&lt;BR /&gt; is_sess_old&lt;BR /&gt;fi&lt;BR /&gt;if [ -a $NUM ]&lt;BR /&gt;then&lt;BR /&gt; S_NUM=`cat $NUM`&lt;BR /&gt;else&lt;BR /&gt; init_num&lt;BR /&gt; S_NUM=`cat $NUM`&lt;BR /&gt;fi&lt;BR /&gt;S_NUM_OLD=$S_NUM&lt;BR /&gt;let S_NUM=S_NUM_OLD+1&lt;BR /&gt;if [ $S_NUM_OLD -gt 0 ]&lt;BR /&gt;then&lt;BR /&gt; echo "Moving tape from Drive 1 to Slot $S_NUM_OLD ."&lt;BR /&gt; mc -p $PICKER -s D1 -d S$S_NUM_OLD&lt;BR /&gt; #err code needed&lt;BR /&gt; echo "Moving tape from Slot $S_NUM to Drive 1 ."&lt;BR /&gt; mc -p $PICKER -s S$S_NUM -d D1&lt;BR /&gt; #err code needed&lt;BR /&gt; echo $S_NUM &amp;gt; $NUM&lt;BR /&gt; logger -t chgvol -p local0.info "Changing tape. Pulling from Slot&lt;BR /&gt;$S_NUM"&lt;BR /&gt;fi&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 14 May 2002 11:32:37 GMT</pubDate>
    <dc:creator>Nobody's Hero</dc:creator>
    <dc:date>2002-05-14T11:32:37Z</dc:date>
    <item>
      <title>Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723259#M63565</link>
      <description>Ok, Still dealing with this dat auto loader issue. I was told to go to this link and use this script in conjunction with my fbackup -y command. I still am not sure how I do this. Do I start the fbackup command on 1st line and then append this script? Can someone please advise?&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;####################&lt;BR /&gt;# chgvol for autoloaders&lt;BR /&gt;# Revision 1.0&lt;BR /&gt;# Date: 12/21/99&lt;BR /&gt;# Author: James Kirkland / jtk@atl.hp.com&lt;BR /&gt;# Purpose: To allow fbackup to work with autoloaders&lt;BR /&gt;# NOTE! This script is not supported by HP.  It is provided as an example only!!&lt;BR /&gt;####################&lt;BR /&gt;&lt;BR /&gt;# Setting up variables&lt;BR /&gt;&lt;BR /&gt;TMPDIR=/var/tmp&lt;BR /&gt;RTDIR=/var/adm/chgvol&lt;BR /&gt;SES_FILE=$RTDIR/session&lt;BR /&gt;NUM=$TMPDIR/chg_num.tmp&lt;BR /&gt;PICKER=/dev/picker # device file for the robotic arm&lt;BR /&gt;&lt;BR /&gt;#scripting&lt;BR /&gt;&lt;BR /&gt;get_current_pid(){&lt;BR /&gt;NOW_PID=`ps -ef |grep fbackup |grep -v grep | cut -c 10-16`&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;is_sess_old (){&lt;BR /&gt;S_PID=`tail -1 $SES_FILE`&lt;BR /&gt;get_current_pid&lt;BR /&gt;if [ $NOW_PID -eq $S_PID ]&lt;BR /&gt;then&lt;BR /&gt; echo "Continuing with current session from fbackup PID $S_PID"&lt;BR /&gt;else&lt;BR /&gt; echo "This is the first tape change for fbackup PID $NOW_PID"&lt;BR /&gt; echo $NOW_PID &amp;gt; $SES_FILE&lt;BR /&gt; init_num&lt;BR /&gt;fi&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;init_num() {&lt;BR /&gt;echo "1" &amp;gt; $NUM&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if [ -a $SES_FILE ]&lt;BR /&gt;then&lt;BR /&gt; is_sess_old&lt;BR /&gt;else&lt;BR /&gt; touch $SES_FILE&lt;BR /&gt; is_sess_old&lt;BR /&gt;fi&lt;BR /&gt;if [ -a $NUM ]&lt;BR /&gt;then&lt;BR /&gt; S_NUM=`cat $NUM`&lt;BR /&gt;else&lt;BR /&gt; init_num&lt;BR /&gt; S_NUM=`cat $NUM`&lt;BR /&gt;fi&lt;BR /&gt;S_NUM_OLD=$S_NUM&lt;BR /&gt;let S_NUM=S_NUM_OLD+1&lt;BR /&gt;if [ $S_NUM_OLD -gt 0 ]&lt;BR /&gt;then&lt;BR /&gt; echo "Moving tape from Drive 1 to Slot $S_NUM_OLD ."&lt;BR /&gt; mc -p $PICKER -s D1 -d S$S_NUM_OLD&lt;BR /&gt; #err code needed&lt;BR /&gt; echo "Moving tape from Slot $S_NUM to Drive 1 ."&lt;BR /&gt; mc -p $PICKER -s S$S_NUM -d D1&lt;BR /&gt; #err code needed&lt;BR /&gt; echo $S_NUM &amp;gt; $NUM&lt;BR /&gt; logger -t chgvol -p local0.info "Changing tape. Pulling from Slot&lt;BR /&gt;$S_NUM"&lt;BR /&gt;fi&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 14 May 2002 11:32:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723259#M63565</guid>
      <dc:creator>Nobody's Hero</dc:creator>
      <dc:date>2002-05-14T11:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723260#M63566</link>
      <description>Hi Robert:&lt;BR /&gt;&lt;BR /&gt;A key element is to declare the script (by name) in 'fbackup's configuration file (which you should have anyway to provide adequate 'fbackup' performance).&lt;BR /&gt;&lt;BR /&gt;Have a look at the man pages for 'fbackup'.  In the configuration file ('-c) is an optional entry "chgvol".  The value of this argument is the name of the executable script.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 14 May 2002 11:41:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723260#M63566</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-14T11:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723261#M63567</link>
      <description>This needs to run as a seperate process. So start your fbackup, then launch this script.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 14 May 2002 11:43:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723261#M63567</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-05-14T11:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723262#M63568</link>
      <description>JRF is correct. what the hell was I thinking? I need more coffee - give me n/a's for being braindead (I wonder if I'm management ready now?).&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 14 May 2002 11:46:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723262#M63568</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-05-14T11:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723263#M63569</link>
      <description>Hi Robert:&lt;BR /&gt;&lt;BR /&gt;Read this document and the steps provided at the begining to add the script (TKB #DKKBRC00006969):&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://us-support.external.hp.com/cki/bin/doc.pl/sid=9a0f0b85118e3cfb5f/screen=ckiDisplayDocument?docId=200000057768469" target="_blank"&gt;http://us-support.external.hp.com/cki/bin/doc.pl/sid=9a0f0b85118e3cfb5f/screen=ckiDisplayDocument?docId=200000057768469&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Shiju&lt;BR /&gt;</description>
      <pubDate>Tue, 14 May 2002 11:47:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2723263#M63569</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-05-14T11:47:59Z</dc:date>
    </item>
  </channel>
</rss>

