How to launching a perl script by the "begin" script of a jumpstart

Hi all,
i have an urgent pb with my solaris jumpstart, let me explain to you :
i want that the begin script launch some perl script, but i have a problem
here is my "begin" script:
echo "Begining ISO FLAR based jumpstart."
echo ""
echo "Starting Ullink Configuration"
env > /tmp/env
/bin/sh << EOF
/usr/bin/perl /cdrom/.archives/admin-scripts/sethostname.pl
EOFmy perl script use a STDIN
with this configuration, the perl script is launching but it runs in a loop indefinitely with an error "use of uninitialized value", because (i think) a value is return to the begin scritp and not to the perl script.
well, on a pre-installed solaris, if a launch the begin script, it happens the same thing, it runs in a loop, BUT if i comment the line "/bin/sh <<EOF" and "EOF", it works.
at this step, i say "ok it's cool my script is working", but when i use it during the jumpstart instalaltion, the perl script does not start, without any particular error.
here is my perl script, if you want to test :
#!/usr/bin/perl -w^M
# Set Hostname for Ullink Jumpstart^M
^M
use strict;^M
^M
sub hit_enter {^M
    print "Hit enter to continue\n";^M
    <STDIN>;^M
    print "\033[2J";^M
}^M
^M
sub get_hostname {^M
    my %towns_list = (^M
        'Paris' => 'PA',^M
        'New-York' => 'NY',^M
    );^M
^M
    my %sites_list = (^M
        'Office' => 'OFC',^M
        'Redbus' => 'RED',^M
        'Telehouse' => 'TLH',^M
        'DTC' => 'DTC',^M
        'iAdvantage' => 'IAD',^M
        'Nutley' => 'NUT',^M
        'Level3' => 'LV3',^M
        'Equinix' => 'EQX',^M
        'Tata' => 'TAT',^M
        'Switch-data' => 'SWI',^M
        );^M
^M
    my %usage_list = (^M
        'Production' => 'PRD',^M
        'UAT' => 'UAT',^M
        'DMZ' => 'DMZ',^M
    );^M
^M
    sub select_list {^M
        my $counter=-1;^M
        my %hash_list = @_;^M
        my @keys = keys %hash_list;^M
^M
        # Clear screen^M
        print "\033[2J";^M
        print "In which country this machine is hosted or will be host and will be used ?\n\n";^M
^M
        # Get all keys from hash^M
        my $key;
        while ($key = each %hash_list ) {^M
            $counter++;^M
            print "$counter - $key\n";^M
        }^M
^M
        print "\nChoose the number corresponding to your choice :\n";^M
        my $choice_number;
        chomp ($choice_number = <STDIN>);^M
^M
        # Verify answer^M
        if (($choice_number =~ /\d+/) and ($choice_number <= $counter)) {^M
            # Add choice to chosen hostname^M
            my $chosen=$hash_list{$keys[$choice_number]};^M
            return $chosen;^M
        } else {^M
            print "\nYour answer is not correct, you need to enter a number between 0 and $counter\n";^M
            &hit_enter;^M
            &select_list;^M
        }^M
    }^M
^M
    sub srv_number {^M
        print "\033[2J";^M
        print "What is the server number ?\n";^M
        my $server_number;
        chomp ($server_number = <STDIN>);^M
        if ($server_number =~ /\d+/) {^M
            return $server_number;^M
        } else {^M
            print "\nYour answer is not correct, you need to enter a number\n";^M
            &hit_enter;^M
            &srv_number;^M
        }^M
    }^M
^M
    my $full_hostname = &select_list(%towns_list).'-';^M
    $full_hostname = $full_hostname.&select_list(%sites_list).'-';^M
    $full_hostname = $full_hostname.'SRV-';^M
    $full_hostname = $full_hostname.&select_list(%usage_list).'-';^M
    $full_hostname = $full_hostname.&srv_number;^M
^M
    sub write_hostname2tmp {^M
        open (HOSTNAME, ">/tmp/set_hostname") or warn "Couldn't write $_[0] to temp file : $!\n";^M
            print HOSTNAME "$_[0]\n";^M
        close (HOSTNAME);^M
    }^M
^M
    print "\033[2J";^M
    print "Is $full_hostname the correct name for this server ? (y/n)\n";^M
    if (<STDIN> =~ /y|yes/i) {^M
        &write_hostname2tmp($full_hostname);^M
    } else {^M
        print "Would you like to retry (r) or set manually the hostname (s) ? (r/s)\n";^M
        if (<STDIN> =~ /s/i) {^M
            print "Type the full required name and hit enter when finished :\n";^M
            chomp ($full_hostname = <STDIN>);^M
            &write_hostname2tmp;^M
        } else {^M
            &get_hostname;^M
        }^M
    }^M
}^M
^M
# Start configuration^M
print "\033[2J";^M
print "\n########################################################\n";^M
print "#\t\t\t\t\t\t       #\n";^M
print "#\t\t\tULLINK\t\t\t       #\n";^M
print '#  Solaris Environnement Installation for Datacenters  #';^M
print "\n#\t\t\t\t\t\t       #";^M
print "\n########################################################\n\n";^M
print "Before starting installation, you need to enter a set of informations.\n(answer to all questions, you can Ctrl+C to stop now)\n\n";^M
&hit_enter;^M
^M
&get_hostname;^Mthank for your help
Edited by: ullink on Jun 25, 2009 6:05 AM

Hi Manju,
You can try the following command and check if any helps:
Get-Exchangeserver |where-object{$_.AdminDisplayVersion -like "Version 15*"} |Get-MailboxStatistics | Ft -auto -wrap DisplayName,database,servername,*size*,*time*
Best regards,
Niko Cheng
TechNet Community Support

Similar Messages

  • Running perl scripts off the preinstall script during a pkgadd

    Hello,
    I'm trying to build a custom package (apache2 + mysql + php + other stuff) and get stuck on some stone wall that I can't figure.
    Correct me if I'm wrong in my assumptions, and if able, could you provide a work around ? Here it is :
    - The preinstall script must be in /bin/sh , /bin/bash or any valid shell
    - Must be run by root, 'f course
    Now.. As I'm not that strong on bash/sh scripting, I tried to call a perl script off my preinstall script. Somehow my preinstall script just never call the .pl .
    This leads me to my third assumption :
    - It is impossible, not permissible to run other scripts from the preinstall script.
    Basically the perl script checks for some users in /etc/passwd + /etc/group, checks for some directories, create a custom SMF manifest, etc etc . I pretty much want the .pl script to be run.
    The script itself is well packaged, correctly inserted in the package's pkgmap, and so on.
    Any ideas ?
    Thanks,
    Jeff

    The script itself is well packaged, correctly inserted in the package's pkgmap, and so on.http://docs.sun.com/app/docs/doc/817-0406/ch3enhancepkg-10289?a=view

  • Does anyone know how to add a preface page at the beginning of the book in ibooks author once the book is written? No matter how I try to add a Preface page, it goes to the end of the book.

    Does anyone know how to add a preface page at the beginning of the book in ibooks author once the book is written? No matter how I try to add a Preface page, it goes to the end of the book.

    Thanks. I've tried this and apparently the template I'm using is one of those where it doesn't work. I've tried dragging it as well as cutting a pasting but it always travels back to the end of the book. Maybe I can try changing the template temporarily, move the preface page, and then convert back to the original template. I'll experiment a little.

  • How do we enable cutter option in the SAP Script for Zebra Label Printer

    Hi Gurus,
    We use Zebra Label(ZM400) printers to print the material documents(SAP Script). Could someone please tell me how do we enable the cutter option in the Zebra printer for the SAP Script?
    Your vaulable answers will be highly appreciated.
    Thanks in advance.
    Regards,
    Manoj.

    Hi Manoj,
         In Script you dont want to add any logic for Label Cutter, It should be in the Zebra printer settings if the printing is over it should cut the paper. If the print area is predefined for your material label then you can make use of standard label papers (Like 2"x4", 3"x4"....)
    Regards
    GK.

  • How to add a script to the toolbar script?

    How do I make an Automator script/application into a script accessible from the toolbar?  In the toolbar I have the Script icon.  I'd like to be able to access my own script from there from a third-party app.  Can this be done?

    Hi Albert.
    You need to do a few things for that :
    - Create your own GUI status by copying STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN.
    - Set your own PF-Status using the Exclude table because otherwise your exclude table would become meaningless.
    - define a subroutine to handle the user commands.
    Sample implementation :
    FORM pf_status USING extab TYPE slis_t_extab.
      extab = pf_exclude.   
      SET PF-STATUS 'STANDARD' EXCLUDING extab.       
    ENDFORM.                    "PF_STATUS
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'PF_STATUS'
          is_layout                = layout
          it_fieldcat              = fieldcat
          it_excluding             = pf_exclude
        TABLES
          t_outtab                 = itab
        EXCEPTIONS
          OTHERS                   = 0.
            FORM user_command  USING r_ucomm LIKE sy-ucomm
                                       rs_selfield TYPE slis_selfield.
    ENDFORM.
    Please reward points if found helpful.

  • How to insert a black space at the beginning of a timeline

    Hi guys,
    Sorry for the stupid question....I only bought FCPX yesterday.
    I have figured out how to drop an audio file into the timeline and add some title effects to the beginning. But now i want to add a black space at the beginning.
    Is there an easy way to do this that I have simply missed - I have spent several hours trying to find a way to do it... 
    Thanks in advance for your help  
    Best regards,
    Craig

    Thanks everyone for the help - really appreciate it !!
    I didn't know that there could only be one "correct" answer - so sorry to Tom if I have done this incorrectly. I was too excited that both answers worked for me that I didn't really concentrate hard enough on whose idea it was - I thought I could mark them both as correct.
    Next time I will take more time for a considred response.
    Thanks again everyone - you really helped me out.
    Cheers,
    Craig

  • [SCORE] How to make an unfinished bar at the beginning of a song?

    I'm working on a song and I'm trying to get the score right.
    The song has an unfinished bar in the beginning; the song is in 4/4 but the very first note starts at the 4th count of the first bar. In the score, Logic automatically puts in a breve rest followed by a quarter rest (interpretation is on), but that's not what I want. At the end of the song, the "missed" notes complement the first bar (so it's in fact a 3/4 bar).
    My problem is that I can't look it up in the manual nor internet, because I don't know the proper English word for it (it's called "opmaat" in Dutch). Online dictionaries aren't helping me either... Sorry for that!
    I can of course set the signature of the 1st bar to 1/4 and make the last 3/4, but then you see the signature change as well in the score.I guess there most be another way to make an "opmaat". Does somebody know this?
    Thanks in advance!
    Message was edited by: Jan Voortwist

    {quote:title=Jan Voortwist wrote:}
    Maybe a stupid question,{quote}
    On the contrary ...!
    how do I dedicate a staff style just to the extra region at the beginning of the song?
    1 - Do you have a region that starts at the very beginning of the Track? Say bar 1?
    2 - Assuming you have a region starting from the very beginning of the song. Cut that existing region at the Right Hand point where you want your 'extra region at the beginning of the song' to end. This should now fit exactly to the rest of the Region on that Track, and when you open the Score Editor there will be a continuous stave of music.
    3 - This now can be treated as a discrete Region in its own right. Open the Score Editor on that Region and change the Staff style by going to Layout>Staff Styles
    4 - Click on New and a menu will open with a list - from that list select Duplicate - this will give you the same Staff Style as that instrument that was already on that Track.
    5 - Double Click the name and Type in your own Name ..say *Piano NEW* - then be sure to TAB out of the box.. Logic 8 does not allow you to change the name if you just click somewhere else. You can then make the changes necessary to that Staff Style as per my example ( ie no Rests)
    6 - You will then find that Piano New appears in the list of Staff Styles for use in any other situation.
    HTH

  • How to close open subvi's in the beginning of running the main vi.

    Hello,
    I've got a pretty large application that is dependant on several subvi's.
    I'm searching for a way to close the subvi's when I start running my main application.
    All these subvi's need to be closed during the initialisation phase of my main application. (before it is doing its main task.)
    I know it is possible to ask for the VI's in memory for my LabVIEW application, but I don't know how to close a subvi programmatically. (unload it from memory)
    What I want to do is check for a list of open subvi's in the beginning of my main application. (only a limited set of subvi's)
    If one of the subvi's is indeed open I want to close it (unload it) and then start doing my thing from within the main application.
    Note: The subvi's need to be closed so that I can load them dynamically later in the program. If one of the subvi's is open and I start running my main application I get an incorrect behaviour.
    Thx for the help!
    Message Edited by noxus on 11-14-2006 08:07 AM

    Noxus,
    I programmed a small example.
    If you have further questions do not hesitate to come back...
    BR,
    ThSa
    (Additonally I added the screenshot in term of that you do not have LV 8.20)
    http://www.newgistics.com
    Attachments:
    VI_Server_LV820.zip ‏12 KB

  • How to play an audio file from the begin.........

    Hello to everybody,
    I am working on a application that is supposed to manage audio file. At the moment I 'm using the SourceDataLine instead of the Clip. But I've got a problem. When the user pushes the Stop button I want that if he pushes Play again the track starts from the begin. I've used the drain() and flush() method but it doesn't work because the track resumes from the point when has been interrupted. Here part of the code:
    @Override
    public void run()
    try
    if(dataline!=null)
    dataline.open(audio_format);
    dataline.start();
    int i=0;
    while((i=audio_input_stream.read(buffer, 0, buffer.length))!=-1 && flag==false)
    if(i>0)
    dataline.write(buffer, 0, i);
    dataline.drain();
    dataline.stop();
    dataline.flush();
    dataline=null;
    dataline.close();
    And also I'd like to know how to navigate through the audio file by a slider or something like that, so how much time is passed.
    Thank you in advance.
    Maurizio Di Vitto

    mauriziodvt wrote:
    I've tried to use it but I found out that if I use quite large wav files an exception is thrown, Aha! I expected as much. That is why I developed BigClip.
    ..so I thought to change to SourceDataLine even if Clip has the right stuff to manage my audio files. So what do you suggest? Is there a way to avoid such problem? I mean, how can I be sure that I'm able to use every wav files? Not every WAV file can be opened using SourceDataLine, but if SDL can open it, so can BigClip.

  • How to include "any" or wildcard in the beginning of my search

    Hello,
    my customers have the need of using a wildcard operator in their searches in the beginning of a phrase.
    For example when searching for "sharepoint" to also be able to search like "*repoi*".
    From what I know KQL does not support wildcards in the beginning of a word.
    Is there another way to work around this issue?
    Thank you!

    You cannot use wildcard before text in KQL. 
    Try to use FQL. Not sure if this will work but you can give it a try
    http://msdn.microsoft.com/en-us/library/office/ff394606%28v=office.15%29.aspx
    string("this *ample")
    Check if this webpart helps you
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/05/13/wildcard-search-web-part-for-sharepoint-2010.aspx
    If this helped you resolve your issue, please mark it Answered

  • How to add an upbeat note at the beginning of song?

    At the beginning of some songs you have that first up beat before the first down beat of a 4/4. Is there a way to add this on an ipad version? Thanks for your help!

    Hi Vamsi,
    There are a few options ...
    1) The one suggested by Prasanna
    2) Loop through all rows via JavaScript and use the GridObject methods to set cell values and then perform an applet.refreshGrid( false )
    3) Apply an Inline transform
    4) Use a stored procedure to return the results and the totals as one recordset.
    The stored procedure would be the fastest for runtime.
    The Iniline XSL transform would be the second fastest.  If you specify the XSL in a generic way, you may even be able to reuse it in other scenarios.  If you hardcode the fields in the XSL, it would be a matter of simple code adjustment when you encounter a similar scenario.
    Hope this helps.
    Cheers,
    Jai.

  • How do I remove residual frames at the beginning and end of a video?

    I'm making a short clip with black slugs at the beginning and end. But there are two or three residual frames from the incoming clip after the black clip that stay at the beginning and end of the video and I can't remove them.  I've tried trimming the beginning and end of the video several different ways, and the frames won't disappear. They stay in the video when I make a DVD. The very first and very last frame have sprocket holes in them on the edge of the frame. I'm baffled. Is this an artifact of using the trial version?

    chances are they are from a fade.  have you zoomed in really really close and checked if there is a small fade in or fade out?  happens to me all the time, and with the fade out, you can't do anything to fix it (that I've found) except replacing the clip from your Browser.  See my similar question here:
    https://discussions.apple.com/thread/3589714
    Hope that helps.

  • How do I add a pause to the beginning of TTS audio file ?

    Hello,
      I am using Captivate 6, and I am having adding a pause to the beginning of my TTS audio file.  I would like to like up the text with the video.  I've attached a video to show you the problem.  Thank you!

    Sorry but your video does not seem to play.
    I was going to suggest, that what you want to do is actually very easy. If you have already created the TTS audio file and have it on the slide, just drag the audio file to the right on the timeline for a second or two. That will delay the start of the audio just the same way it does for any other object you want to appear at a given point.

  • How do I insert an image at the beginning of a composition lightbox sequence

    Using v4.1 build 8 on MacBook Pro10.6.8
    I have an existing lightbox,and I want to add an image (trigger) at the beginning of the sequence, displacing the other triggers/ images to the "right", or "down". 
    Alternatively, is there a way to re-order the sequence of the triggers/ images on the page?
    Joan

    Hello,
    You can add the new image and after that select the trigger and Drag it to the left of the first image.
    Please refer to the video : http://trainingwebcom.worldsecuresystems.com/SachinFTP/2013-06-18_2120.swf
    Regards,
    Sachin

  • How do I add more measures to the beginning of a song?

    I have began making a song, and I have all the regions starting right at the beginning, but I would prefer to move them to later in the song so that I can add a nice intro, but I don't want to get them off the right mix.
    I am afraid if I move them I won't get them back on the right place relative to the other tracks in the song.
    Is there a way to add like 30 measures to the beginning of the song and just move all the other ones equidistant to later in the song.

    if you don't know what they are, you obviously didn't add any, so you're fine.
    open GB's help and search for "curve" to learn more

Maybe you are looking for

  • How to post 100 records from R3 to file in XI

    Hi,    Can any one explain me how to post 100 from R3 using RFC sender adapter to flat file. thanks dhanush.

  • T-code CS03 in ITS

    Hello All,          I'm facing problems when using t-code CS03 in ITS. 1. When I click on Document item in a BOM, it is not navigating to document in CV03N. the system reacts nothing.... 2. From document tab, I cannot come back to Material and Genera

  • New lot not appearing in qa32 - v urgent

    Hi all, I have an urgent issue to resolve. we have developed a report that shows those batches -for which UD has been done 8 days before but no despatch till date  OR -for which no UD has been done and date of production is 8 days before from today.

  • 2011 Macbook pro Keyboard Unresponsive

    Hi, I have a 2011 17" Macbook Pro. I'd left it in a cupboard - working - for a few months, as I got an iPad and didn't use it so much. Now, when I try to use it, the keyboard is moreorless totally unresponsive. I can use a bluetooth keyboard. The onl

  • My i cloud acount not working

    The games data is all gone I have to start all over and some apps can't open