Router script for Automated router changes

I am new to the scripting world and do need assistance in developing a script that will assist me to perform the following tasks when executed
1] remove all existing tunnels
2] remove dialer/BVI interface
3] create new DMVPN tunnel
- tunnel x--- MPLS connection to data center
-tunnel y--- Guest traffic
4] Configure interface gi0/2 for broadband connection
- negotiate DHCP addresses
5] remove RIP routing
6] remove EIGRP routing
7] remove route-map pbr-dsl
8] remove route-map pbr-extsrv
9] create route-map for internet traffic over verizon ( pbr-verizon)
- set interface gi0/2
10] create route-map for internet traffic over mpls (pbr-mpls)
- set interface ser0/0
11] apply pbr-verizon to VLANS 10,20,30,40
12] modify NAT statement
13] create inbound and outbound ACL for Gi0/2 interface
- permit udp gre traffic from VIP
- permit tcp any any established
-permit tcp any any eq ftp-data
-permit udp any any eq domain
14] combine all other ACL to ensure no blocking will occur based on all internet traffic from verizon and not mpls

Joseph,
My question is on syntax when using username and password.  I'm stuck on a script that I found here on the support forums that is using the Expect command. 
My goal is to run the script from a host monitoring server using a device list file to go out and telnet into each one of the routers to run a "Show Inventory" command. 
All the routers are using local AAA with username and password to get to the Privledged Exec mode.  Here's a copy of my script.  I have bolded the parts that I'm curious if correct.  If you could check over it and let me know where my mistakes (If any) are located, I'd appreciate it.  Thanks, Brandon
# Here, we specify all our commands in a list, that we will issue one
# by one at a later time.
set commands {
    "show inventory"
# This variable is for a file called hosts.txt that has the hostname/IP
# of all of the routers you are collecting information from.
set device_list [read [open "hosts.txt"]]
# Specify the username and password, as well as what we expect the routers'
# prompt to be.
set username "blah"
set pass "mypassword1234"
set prompt "#"
# This command tells expect not to echo the output to the console.
exp_log_user 0
# We loop through each device in our list, one by one...
foreach device $device_list {
    # Set each device's log file to be the name of the device...
    # (i.e. router1.location.com-log.txt)
    set file_name "$device-log.txt"
    # Assuming you are using PuTTY, and have plink.exe, we initiate the SSH
    # connection
    exp_spawn plink.exe -telnet $device
    # If we see a message asking about the device's host key, accept it.
    expect -re ".*ogin:" {
        exp_send "$username\r"
        exp_send "$pass\r"
    # We log our output from each router to its specified file.
    exp_log_file -a $file_name
    # Loop through each command that we specified earlier.
    foreach cmd $commands {
        expect -re $prompt {
            exp_send "$cmd\r"
            exp_sleep 1
    # Now we enter enable mode for the running-config
    expect -re $prompt {
        send "en\r"
    expect -re ".*assword:" {
        send "$enable_pass\r"
    expect -re $prompt {
        send "term len 0\r"
    expect -re $prompt {
        send "show running-config\r"
    expect -re $prompt {
        exp_send "quit\r"
    # Turn off logging.
    exp_log_file

Similar Messages

  • Script for Automator to reorder text in file/folder name.

    I have a folder full of pictures named by their first and last names. I need them to be renamed by listing them by last name first, first name last in order to get them alphabatized properly. Anybody out there have a nice Automator script for me to make this happen? I'm new.
    Looking for it to look like this:
    Brown, John

    Try this (should work for "John H Smith" --> "Smith John H" as well):
    The Run Shell Script Action is:
    for f in "$@"
    do
        basename=${f##*/}
        path=${f%/*}
        ext=${f##*.}
        name=${basename%.*}
        if [[ "$name" =~ \  ]]; then
            fname=${name% *}
            lname=${name##* }
            name="$lname $fname"
            mv "$f" "$path/$name.$ext"
        fi
    done
    If you want a comma, then change: name="$lname $fname" to name="$lname, $fname"
    As with all scripts, back-up the files before running

  • Cannot load script for the required change in butt...

    I got the email saying Skype will be changed after 15 March.  It says we need the new buttons.  So I go the site, and then there is a big box which says: "cut and paste this" which is:
    <script type="text/javascript" src="http://www.skypeassets.com/i/scom/js/skype-uri.js"></script>
    <div id="SkypeButton_Call_[Removed for privacy]_1">
    <script type="text/javascript">
    Skype.ui({
    "name": "call",
    "element": "SkypeButton_Call_[Removed for privacy]_1",
    "participants": ["[Removed for privacy]"],
    "imageSize": 32
    </script>
    </div>
    So where do I paste this script. Plus I get we need to do on our Ipads as well.

    Hi sheshu0022,
    Based on my research, the issue can be occurred due to something get corrupted in the script task. To fix this issue, please copy the code in the task, then rebuild the script task with the same code to test again.
    The following similar thread is for your reference:
    http://stackoverflow.com/questions/15165760/ssis-script-task-fails-on-server-with-error-cannot-load-script-for-execution
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Need Help with scripting for Automator/AppleScript.

    Hi everybody,
    I am building a small app for my mac, What I need is a script that can rename a file that I drop on it.
    and example being:
    example.jpg
    (when I drop it on the app, I want the app to change the filename of the document to "Image.jpg"
    I have tried this with Automator, but it requires that I specify the file to be changed, what I need is something that will change the name of any file I drag onto it.
    I am using it for application specific files.
    Kind regards,
    Pete.
    iBook G4; 60GB Hard Drive, 512MB RAM, Airport Extreme    

    Open the Script Editor in the
    /Applications/AppleScript/ folder and enter the
    following:
    on open(the_file)
    tell application "Finder"
    set name of the_file to "Image"
    end tell
    end open
    Save this script as an application.
    (11347)
    this script compiled correctly; however when run it returned the following error "Can't set name of (the_file) to "Image.jpg"
    I am also given the option of editing the script or just quitting.
    thanks for your help

  • Local policy route-map for policy route

    Hi 
    this is related my previous question:
    I want to set policy route on asr1004, that redirect vpn traffic. 
    my case is:
      asr1004 import a default route 0.0.0.0 from int 0 with bgp neibour address 10.100.100.100
    assume internal traffic 10.10.10.0/24 coming into asr1004 on int 1.
    assume vpn with ip address 10.2.2.2 is direct linked to asr1004 int 2, and int 2 ip address is 10.2.2.1
    assume taget network is 10.200.200.0/24
    I want internal traffic (10.10.10.0/24) go to target (10.200.200.0/24)  to be redirect to10.2.2.2 (vpn)  first, so I add  "ip route 10.200.200.0/24 10.2.2.2" on asr1004.
    Than, I want vpn (10.2.2.2) encrypt traffic and send it to one of ip in10.200.200.0/24 range again. at this point if I put local policy route-map below, is it will work?
    ip local policy route-map vpn-out
    access-list 100 permit ip 10.2.2.2 any
    route-map vpn-out permit 10
      match ip address 100
      set ip next-hop 10.100.100.100
    if not, do I have any change to do policy route for this case?
    any comment will be appreciated
    Thanks in advance
    Julxu

    hi Jon
    can I refresh the question again:
    my case is:
      asr1004 import a default route 0.0.0.0 from int 0 with bgp neibour address 10.100.100.100
    assume internal traffic 10.10.0.0/16 coming into asr1004 on int 1 with ip address 10.3.3.3
    assume vpn with ip address 10.10.2.2 is direct linked to asr1004 int 2, and int 2 ip address is 10.10.2.1
    assume taget network is 10.200.200.0/24
    I want internal traffic (10.10.0.0/16) go to target (10.200.200.0/24)  to be redirect to10.10.2.2 (vpn)  first, so I add  "ip route 10.200.200.0/24 10.10.2.2" on asr1004.
    Than, I want vpn (10.10.2.2) encrypt traffic and send it to one of ip in10.200.200.0/24 range again. at this point if I put local policy route-map below, is it will work?
    ip local policy route-map vpn-out
    access-list 100 permit ip 10.10.2.2 any
    route-map vpn-out permit 10
      match ip address 100
      set ip next-hop 10.100.100.100
    such as:
    interface TenGigabitEthernet0/0/0
     description bgp to get default
     ip address 10.100.100.100 255.255.255.252
     no ip redirects
     no ip unreachables
     no ip proxy-arp
    interface TenGigabitEthernet0/1/0
     description get internaltraffic
     ip address 10.3.3.3 255.255.255.0
     no ip redirects
     no ip unreachables
     no ip proxy-arp
    interface GigabitEthernet0/2/1
     description vpn
     ip address 10.10.2.1 255.255.255.248
     no ip redirects
     no ip unreachables
     no ip proxy-arp
     media-type rj45
     negotiation auto
    ip local policy route-map vpn-out
    access-list 100 permit ip 10.10.2.2 any
    route-map vpn-out permit 10
      match ip address 100
      set ip next-hop 10.100.100.100
    ip route 10.200.200.0/24 10.10.2.2
    Could you please advise if it is correct?

  • Lync router configuration for MI424WR Router

    Has anybody gotten the router port forwarding configuration to work for Microsoft Lync?  I can hear everybody on Lync but nobody can hear me.  I've followed the recommendations from Microsoft as much as I can figure on adding the port forwarding information but it's still not working.

    -->NAT the current public IP to the internal IP of the 2 new CAS server (which also got the HT
    role installed),
    You should NAT 2 internal IPs of the (CAS servers) to 1 external IP. Add these CAS servers as the source
    servers in the send connector.
    -->Internally, I would need to update the CASArray DNS record (currently pointing to old CAS server) to
    point to the WNLB virtual IP
    This is correct
    Configure send connector to use external DNS for dns lookup
    Go to send connector properties and tick "use the external dns lookup settings on the transport
    server" and add external DNS IPs in your transport server properties using this command.
    Set-TransportServer Hub01 -ExternalDNSAdapterEnabled $false -ExternalDNSServers {192.168.1.1, 192.168.1.2}
    You may face some unknown issues depends on how you maintain. 
    I had one issue long back in exchange2007 CCR with NLB. I
    was clearing the DNS cache every1-2 days due to email delay.
    Final I gave them a script to clear the DNS cache.

  • PowerShell script for AD name change

    I need to change all users logon name in AD to their first name.last name    Server 2003

    Here is my suggestion of a PowerShell V1 script to rename all users (sAMAccountName):
    # Filter on all users that have givenName and sn assigned.
    $searcher=[adsisearcher]'(&(objectCategory=person)(objectClass=user)(givenName=*)(sn=*))'
    [void]$searcher.PropertiesToLoad.Add('distinguishedName')
    [void]$searcher.PropertiesToLoad.Add('sAMAccountName')
    [void]$searcher.PropertiesToLoad.Add('givenName')
    [void]$searcher.PropertiesToLoad.Add('sn')
    $searcher.PageSize
    = 200
    $Results =
    $searcher.FindAll()
    ForEach ($Result
    In $Results)
        # Retrieve values.
        $DN
    = $Result.Properties.Item("distinguishedName")
        $NTName
    = $Result.Properties.Item("sAMAccountName")
        $First
    = $Result.Properties.Item("givenName")
        $Last
    = $Result.Properties.Item("sn")
        # Construct desired "pre-Windows 2000 logon" name.
        $NewName
    = "$First.Last"
        # Make sure new name 20 characters or less.
        If ($NewName.Length
    -gt 20)
            # I don't know how to trim $First in PowerShell to make $NewName 20 characters.
        # Check if name should be updated (case insensitive).
        If ($NTName
    -ine $NewName)
            # Trap possible error.
            Trap
                "Unable to rename user $DN to $NewName"
                "Error description: $_"
                Continue
            # Bind to user object in AD.
            $User
    = [ADSI]"LDAP://$DN"
            # Assign new name.
            $User.sAMAccountName
    = $NewName
            # Save the change to AD.
            $User.SetInfo()
    Test first, by commenting out the SetInfo() statement and echo $DN and $NewName for all  users. Note that the script could trim $First to limit $First.$Last to 20 characters, but I could not find a way to do this. Also, this script does nothing to prevent
    duplicate sAMAccountName values, but the possible error will echo to the screen.
    Richard Mueller - MVP Directory Services

  • Script for automator to names jpegs with incorrect metadata date

    I use Automator to name my images YYYYMMDDHHMMSSname.jpg. Some images have the incorrect time stamp because I forgot to change the camera time while traveling in a different time zone. How do I write a script to correct this?
    G5, dual 2 GHz   Mac OS X (10.4.8)  

    If your camera records EXIF data with each jpeg, then try using EXIF Renamer rather than Automator.
    20 iMac G5, 1.25Gb RAM, 20Gb iPod, iSight   Mac OS X (10.4.8)   Newton 2100, 2000 (upgraded).

  • Script for automation.

    Rhel 5.
    11.2.0.3
    Any body have idea how to write a scripts to fullfill below requirments.
    script 1) Change Partition name and subpartition name ( Range Hash). First List and then change.
    script 2) Estimate Size and then purge data of selected partition by exchanging into a separate table.
    any help will be highly appreciated!!
    My workaround is
    *1) script 1*
    i) partition and sub partition listening.
    select table_name, PARTITION_NAME,TABLESPACE_NAME from user_tab_partitions where table_name='XXXX';
    select partition_name,TABLESPACE_NAME from user_segments where segment_name='XXXX';
    partition and subparition renaming
    ii) partition and sub parition renaming.
    alter table <tablename> rename partition <old parition name> to <new parition name>;
    ALTER TABLE <tablename> RENAME SUBPARTITION <old-partition-name> TO <new-partition-name>;
    *2) scrpit 2*
    I) Estimate size of sub parition
    select substr(partition_name,1,7) p_name,sum(bytes)/1024/1024 "MB" from user_segments where segment_name='INFO' group by substr(partition_name,1,7);
    ii) Exchange parition.
    a) create a table with sub parition type i.e hash parition table
    b) create new table rang hash.
    c) first exchange partition with sub partition type table than exchange sub partition type table with new rang hash partition.
    alter table <old range hash table> exchange partition <partition name> with table <sub type hash table>;
    alter table <sub type hash table> exchange partition <partition name> with table <new range hash table>;
    Now my question is how can i read partition and sub parition names in script and than rename and exchange it dynamically??.
    Edited by: Kh$n on Apr 25, 2013 5:20 AM

    1) day wise not month wise.what? dont understand sorry, plase elaborate it.
    2) i dn.t want to truncate it directly before truncating i want to save that data to another table thats why am exchanging it.with an example:
    SQL> CREATE TABLE my_table
      2  (id  NUMBER(5),
      3  name VARCHAR2(30),
      4  mydate    DATE)
      5  PARTITION BY RANGE(mydate)
      6  (
      7  PARTITION january2013 VALUES LESS THAN(TO_DATE('01/02/2013','DD/MM/YYYY')),
      8  PARTITION february2013 VALUES LESS THAN(TO_DATE('01/03/2013','DD/MM/YYYY')),
      9  PARTITION march2013 VALUES LESS THAN(TO_DATE('01/04/2013','DD/MM/YYYY')),
    10  PARTITION april2013 VALUES LESS THAN(TO_DATE('01/05/2013','DD/MM/YYYY'))
    11  );
    Tabla creada.
    SQL> insert into my_table values (1, 'Fran', '01/01/2013');
    1 fila creada.
    SQL> insert into my_table values (1, 'Mike', '11/02/2013');
    1 fila creada.
    SQL> insert into my_table values (1, 'Donald', '11/03/2013');
    1 fila creada.
    SQL> insert into my_table values (1, 'Anna', '11/03/2011');
    1 fila creada.
    SQL> commit;
    Confirmaci¾n terminada.
    SQL>
    SQL> select * from my_table;
            ID NAME                           MYDATE
             1 Fran                           01/01/13
             1 Anna                           11/03/11
             1 Mike                           11/02/13
             1 Donald                         11/03/13
    SQL> create table my_new_table(id number(5), name varchar2(30), my_date date);
    Tabla creada.
    SQL> select * from my_new_table;
    ninguna fila seleccionada
    SQL> ALTER TABLE my_table
      2  EXCHANGE PARTITION march2013
      3  WITH TABLE my_new_table;
    Tabla modificada.
    SQL> select * from my_new_table;
            ID NAME                           MY_DATE
             1 Donald                         11/03/13
    SQL> select * from my_table;
            ID NAME                           MYDATE
             1 Fran                           01/01/13
             1 Anna                           11/03/11
             1 Mike                           11/02/13With this you directly exchange data from partition to a table, don't need to purge the partition.

  • Script for automated partitioning in the next official release?

    Disclaimer: don't run it with root privileges unless /dev/sda is a blank disk. You have been warned.
    # dhcpcd
    # curl sprunge.us/WATU > autopart #Uppercase required.
    # nano autopart
    # sh autopart
    http://sprunge.us/WATU
    Tested in VirtualBox.
    I remember that the AIF used 100 MB for /boot and 7.4 GB for "/". Close enough, right?
    Users can also edit the script and make their own version. What do you think?
    Last edited by DSpider (2012-08-07 08:22:26)

    DSpider wrote:
    Here's what it looks like multiplied by 1024: http://i.imgur.com/fttkB.png
    And here's what it looks like by 1000: http://i.imgur.com/oaCxF.png
    I don't know about you, but I very much dislike 7.81 GB, 1.95 GB, etc. If you're going to test it in VirtualBox, please create a virtual drive of at least 15.1 GB (100+8+2+5), or, you know, use smaller numbers. Also, using "Dynamic Size" only takes up about 60 MB or so of actual space, so you may as well create a 20 GB+ virtual drive.
    I am doing the max calculation directly on my desktop computer and using 1000 is the only result that corresponds to the label on the disk, so to speak. I'm not sure though, have to look closer at this when I get the time.

  • Batch script for automating process

    Hi all, not sure if this is the right area asking about batch scripts, but this has to do with the back-end system in Hyperion.
    I was wondering if there is a way to run a batch script on the transaction log that will give a list of any new GL accounts that have been added in the prior month or within the last 30 days? Can it also show which users are added to the account?
    The purpose of this is to automate the process periodically and eliminate the Outline Maintenance Log or import to the Outline Maintenance Log. It would be helpful for adding more new cost centers.
    Lastly, can I also run a batch script to see how often our end-users are in Hyperion reports?
    thank you.

    +...give a list of any new GL accounts that have been added in the prior month...+
    Correct me if i'm wrong:
    You want to know new members added in the account dimension recently. Is that right?
    If so, you could do a select command like that:
    SELECT O.OBJECT_NAME -- Just the member name. For alias, you need another join
    FROM HSP_ACCOUNT A -- For performance, i put the smallest table here
    INNER JOIN HSP_OBJECT O ON A.ACCOUNT_ID = O.OBJECT_ID -- Join to get the member name
    WHERE O.CREATED >= (SYSDATE-(30)) -- last 30 days
    Note this specific select you can only get the account dimension. Entity has his own table too.
    For custom dimention it gets a little more complicated.

  • Batch Script for Logging Outline Change(s)

    In 11.1.2.2., is there a way of automatically generating a maintenance log to keep track of each time making changes to the outline?
    I haven't seen it in the docs, but figured that I should double check with the forum...

    You will get a better answer in Essbase forum
    However go through
    http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/outlinechangelog.html
    http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/outlinechangelogfilesize.html
    This is what you are looking for. I'll use that with caution, because it can cause a performance degradation.
    During a restructure, Essbase holds outline change information in memory until all updates have been made to the outline change log. Turning on the outline change log might affect your restructure performance, particularly after dimension builds of several hundred or more members.Regards
    Celvin
    http://www.orahyplabs.com

  • Trying to create a script for iTunes

    This is one of those questions that probably has a very simple answer unless you haven't worked with Automator or applescripts.
    I found Automator, created a script for iTunes to change settings for audiobooks that I import from CD so that it remembers it's place in a "song", makes it so that it doesn't show up in shuffle lists, and doesn't have a gap between songs. Yippee for me.
    I click on File, Save, name the file and save it and ... it doesn't show up under iTunes. It only took me 45 minutes to get it so that the scroll icon shows up under iTunes (I'm so confused now that I don't even know which thing I did caused that to happen) but my script I created doesn't show up.
    I did find one place that said to place the file in (myname\library\scripts\programname) So I went to my home folder, find the library folder, found the scripts folder, and found only one application under there (Safari) but no iTunes. I created a folder called iTunes and saved my script there but ... it doesn't show up under iTunes.
    I did try quitting iTunes and opening it back up and ... it still isn't there.
    Is this even the right place to ask this question?

    OlsonBW wrote:
    ........Is this even the right place to ask this question?
    If it's not, then may I recommend MacFormat Magazine's own discussions forum -
    http://forum.macformat.co.uk/login.php?redirect=privmsg.php&folder=inbox
    I found that this is full of 'Users' and more likely to be experienced using AppleScript and Automator.
    Although I don't say that someone here won't be able to help. Just might take longer here or, as you yourself suggest, may need posting elsewhere on this site. Just speaking from previous experience of both sites

  • HACMP Clustering Script for SAP ECC 6.0 (SR1) - Automatic Failover

    Hello,
    I have installed the SAP ECC 6.0 (SR1) under AIX 5.3 / DB2 V8 FP12 with HACMP Clustering environment. Manual Failover is working fine. Central System has been installed in share drive with Virtual IP and Virtual name inNode A. Dialog Instance is loaded locally in Node B. I want to get HACMP Clustering script(automatic failover script) for Automation. Please help me if you have. It is single package clustering. If Node A fails, Node B will take care ( Central System and Dialog instance will run in Node B)
    Thanks
    Gautam Poddar

    this post is duplicated at Upgrade to ERP 2005/ECC 6.0 from  R/3 4.72/Basis 640 on Z/OS 1.4 DB2 8.1

  • HACMP Clustering Script for SAP ECC 6.0 (SR1) - Automatic Failover-Oracle10

    Hello,
    I have installed the SAP ECC 6.0 (SR1) under AIX 5.3 / Oracle 10g with HACMP Clustering environment. Manual Failover is working fine. ASCS and Database instances are loaded in share drive with Virtual IP and Virtual name. Central Instance and Dialog Instance are loaded locally in Node A and Node B. I want to get HACMP Clustering script(automatic failover script) for Automation. Please help me if you have.
    Thanks
    Gautam Poddar

    Here are HA stop & start scripts that you should be able adapt for your particular circumstances. Based on earlier versions of SAP / Oracle but assume should be a reasonable guide
    Script to start SAP is start_sap_prd
    #!/bin/ksh
    Script:         /usr/local/bin/cluster/start_sap_prd
    Comments:       HACMP Application START script for PRD
    Show me obvious information in hacmp.out
    banner "Starting"
    banner "PRD SAP"
    Set the oracle and sap owner.
    ORASID="PRD"
    SAPADM="prdadm"
    ORAUSR="oraprd"
    VIRTUALHOST="vhost"
    DEVHOST="vhostdev"
    Get the volume groups for this resource group
    RG=$( /usr/es/sbin/cluster/utilities/cllsgrp | grep -i $ )
    VG_LIST=$( /usr/es/sbin/cluster/utilities/cllsres -g $ | \
            grep "VOLUME_GROUP=" | \
            awk -F\" '{ print $2 }' )
    Check the transport directory is mounted.
    if mount | grep -w "/usr/sap/trans"
      then
            print "Transport directory is already mounted."
      else
            cd /tmp
            print "Attempting a background mount of the transport directory."
            nohup mount -o intr,bg,soft :/usr/sap/trans1 /usr/sap/trans &
    fi
    #Start SAP and Oracle
    #Start listener
    su - $ -c /rprd/oracle/PRD/920_64/bin/lsnrctl start
    rc=$?
    if [ $? != 0 ]
      then
            echo "ERROR: Listener failed to start\n"
    fi
    #Start Database
    su - $ -c "/rprd/oracle/PRD/bin/start_database_PRD.sh"
    sleep 20
    Standard sapstart script
    su - $ -c startsap $
    Script:       /usr/local/bin/cluster/stop_sap_prd
    Dated:        01/11/06
    Application:  Oracle/SAP
    Comments:     HACMP Application STOP script for SAP / Oracle PRD
    Show me obvious information in hacmp.out
    Set the oracle and sap owner.
    rc=$?
    if [ $? != 0 ]
    then
            echo "ERROR: Failed to start SAP\n"
    fi
    exit 0
    Script to stop SAP is stop_sap_prd
    #!/bin/ksh
    set -x
    banner "stopping"
    banner "PRD SAP"
    ORASID="PRD"
    SAPADM="prdadm"
    ORAUSR="oraprd"
    VIRTUALHOST="vhost"
    #Stop SAP/Oracle
    su - $ -c stopsap $
    rc=$?
    if [ $? != 0 ]
    then
            echo "ERROR: Failed to stop SAP and Oracle\n"
            break
    fi
    Stop SAP collector and Oracle listener.
    su - $ -c /usr/sap/PRD/SYS/exe/run/saposcol -k
    rc=$?
    if [ $? != 0 ]
    then
            echo "ERROR: Failed to stop SAPOSCOL \n"
    fi
    su - $ -c /rprd/oracle/PRD/920_64/bin/lsnrctl stop
    rc=$?
    if [ $? != 0 ]
    then
            echo "ERROR: Listener failed to stop\n"
    fi
    if mount | grep -w "/usr/sap/trans"
      then
            print "Transport directory is mounted."
            /usr/es/sbin/cluster/events/utils/cl_nfskill -k -u /usr/sap/trans
            sleep 1
            /usr/es/sbin/cluster/events/utils/cl_nfskill -k -u /usr/sap/trans
            sleep 1
            umount -f /usr/sap/trans &
      else
            print "Transport directory is not mounted."
    fi
    exit 0

Maybe you are looking for

  • Archive Logs NOT APPLIED but transferred

    Hi Gurus, I have configured Primary & Standby databases in same Oracle Home. OS version is OEL 5. Database version is 10.2.0.1. I could get the archive logs in the standby site but they are not getting applied in the standby database. I don't have OL

  • Schema editor in windows 7 machine

    Hi i have CC&B 2.3.1 in windows 7 and i just installed Schema Editor in that. I am not able to open schema editor as i have to select Data source from the drop down which is a ODBC configuration in control panel. I couldn't add ODBC configuration in

  • How to initialize the variables in the subvi when the main vi running?

    Hi, friends! Now I am working on a project with labview. I make a main vi  including many subvis. When the main vi running, I want to reinnitialize the variables in the subvi to zero. I know that I can realize that  using the local variable when I en

  • "Internal Error" on start up

    Had the internal error on start up problem. Found a lot of solutions on this list but non worked. I then took a punt on the Fireworks CS4 Panel Prefs.xml' file and renamed it (I wanted to keep it in case it was the culprit). Happy to say it was. Prob

  • Why can't I downgrade my iCloud account

    I no longer want to continue with my iCloud account T £14 a year.  When I log into iCloud settings the option to downgrade to free is greyed out.  Help..