SUMMARY : With code (LONG) Jass Drivers / Finish scripts

From: Garrett, Matt M SITI-ITDIEEE (matt.garrett_at_shell.com)
Date: 06/20/03

  • Next message: Tobias Oetiker: "ufsdump and snapshots"
    Date: Fri, 20 Jun 2003 09:37:30 +0100
    To: "Sunmanagers (E-mail)" <sunmanagers@sunmanagers.org>
    
    

    Thanks to the following for the help

    Harry Hoffman
    John Mitchell
    Grahame Hay

    Few answers
    1. You should probably be using the undo functionality of jass.
       and then re-install jass Main Driver
    2. Make a wrapper script that looks at all the finish scripts

    While option 1 is properly the correct technical answer ,
    Allowing backout and re-installs of Jass Drivers
    It is not for the like's of me.

    Option 2 , I have written a simple perl wrapper that lives on the server
    to check the Finish directory and to create a tmp Driver file
    Would have liked to make this run on the client but could not figure this bit
    out
    As the Driver files seem to be hardcoded in jass-execute so has to run on the
    server.

    I am sure my perl could be improved on but it works for me.

    /jumpstart/jass/jass-execute-finish
    ------------------------------------------------
    #!/bin/perl

    # Wrapper script to run a Finish script that do not have a Driver Script
    # Creates a temp Driver script in Drivers (tmpdriver)
    # Wrapper checks for the Finish script
    # Prints jass-execute -d temp/driver

    # Matthew Garrett
    # Based on a idea By Grahame Hay

    # Get the finish script name from command line
    my $finish = shift ;

    # Work if the Finsh script exists
    chdir("/jumpstart/jass/Finish");
    opendir(DIR, ".");
    @listing = readdir(DIR);
    foreach $list (@listing) {
            stat($list);
            if ((-f _) && ($list eq $finish)) {
                    # If we have got this far , Finish script exists
                    # Create a tmp Driver scripts
                    open(tmpdriver,">/jumpstart/jass/Drivers/tmpdriver.driver") ||
    die "Can't open to write /jumpstart/jass/Drivers/tmpdriver.driver $!";
                    print tmpdriver "#!/bin/sh\n";
                    print tmpdriver "DIR=\"`/bin/dirname \$0`\"\n";
                    print tmpdriver "export DIR\n";
                    print tmpdriver ". \${DIR}/driver.init\n";
                    print tmpdriver "JASS_FILES=\" \"\n";
                    print tmpdriver "JASS_SCRIPTS=\"\n";
                    print tmpdriver "$list\n";
                    print tmpdriver "\"\n";
                    print tmpdriver ". \${DIR}/driver.run\n";
                    close(tmpdriver);

                    # Now print out what client needs to run

                    print "On client run the following command\n";
                    print "/net/SERVER_HOST_NAME/jumpstart/jass/jass-execute -d
    tmpdriver.driver\n";
            }
    }

    -----------------------------------------------------------------------------
    --------

    Matt

    Matthew Garrett
    Unix System Support
    Shell Information Technology International Limited
    Seafield House, North Anderson Drive, Aberdeen AB15 6GZ, United Kingdom

    Tel: +44 (0)1224 81 8373 Other Tel: Internal 630 8373
    Email: Matt.M.Garrett@is.shell.com
    Internet: http://www.shell.com

    > -----Original Message-----
    > From: Garrett, Matt M SITI-ITDIEEE
    > Sent: 18 June 2003 15:17
    > To: Sunmanagers (E-mail)
    > Subject: Jass Drivers / Finish scripts
    >
    >
    > Folks
    >
    > We have been using jass (Solaris 8) for some time now.
    > Very good product
    >
    > One small problem.
    >
    > Some times we need to re-run a Finish script on a client
    > If some thing has gone wrong with just that bit of the client
    >
    > The way we have been doing it is to create a Driver file
    > called test.driver
    > e.g
    > File = test.driver
    > --------------------------------------------------------------
    > ---------------
    > -
    > #!/bin/sh
    > DIR="`/bin/dirname $0`"
    > export DIR
    >
    > . ${DIR}/driver.init
    >
    > JASS_FILES="
    > "
    > JASS_SCRIPTS="
    > install-WHATEVER.fin # <- Need to change
    > to what ever
    > Finish script , you want to run
    > "
    >
    > . ${DIR}/driver.run
    > --------------------------------------------------------------
    > ---------------
    >
    > On the client we then do
    > /net/HOSTNAME/jass/jass-execute -d test.driver
    >
    >
    > Is there a way to run a Finish script with out having to
    > create a temporary
    > driver script first ?
    >
    > Will summarise
    >
    > Thanks
    >
    > Matt
    >
    >
    > Matthew Garrett
    > Unix System Support
    > Shell Information Technology International Limited
    > Seafield House, North Anderson Drive, Aberdeen AB15 6GZ,
    > United Kingdom
    >
    > Tel: +44 (0)1224 81 8373 Other Tel: Internal 630 8373
    > Email: Matt.M.Garrett@is.shell.com
    > Internet: http://www.shell.com
    > _______________________________________________
    > sunmanagers mailing list
    > sunmanagers@sunmanagers.org
    > http://www.sunmanagers.org/mailman/listinfo/sunmanagers
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Tobias Oetiker: "ufsdump and snapshots"

    Relevant Pages

    • Re: ISE/EDK Kubuntu linux installation issues
      ... Note this applies to the USB driver. ... Next download the userspace shim sources from http://www.rmdir.de/~michael/xilinx/ and compile them. ... Ensure the script permissions are set with chmod +x. ... By putting an executable shell script directly in the places where callers look for it, you can add the prelink and the Linux system libaries will sort out whether it's executing a binary or a shell script. ...
      (comp.arch.fpga)
    • Re: Printer Server and Client Drivers
      ... Do the users running the logon script have the right to install printer ... The driver should be downloaded from the server if it either does not ... on the client or is older. ...
      (microsoft.public.windows.server.general)
    • Re: vbs to configure printer to remote machine
      ... Description The printer driver is unknown. ... Win32 error code 1797 ... copy the files you want to install into this directory. ... Microsoft Windows Script Host Version 5.6 ...
      (microsoft.public.windowsxp.print_fax)
    • Re: [SLE] Missing 3D (was Compiz issues.)
      ... This is driver file location in above package ... post-uninstall script that will call tiny-nvidia-installer. ... Strange that it didn't offered to prepare existing kernel sources first. ... It can be that Smart did just what is programmed to do, install rpm, run ...
      (SuSE)
    • Re: Printer Server and Client Drivers
      ... Do the users running the logon script have the right to install printer ... The driver should be downloaded from the server if it either does not exist ... on the client or is older. ...
      (microsoft.public.windows.server.general)