Solaris packaging - "build" class action script

I tried to create a package with a build class action script but having problem with it. I am wondering if any one could give me hint on how to solve this problem? I tried to follow the example on the Solaris tutorial but it didn't work either.
In the prototype file, I have added: e build /etc/randomtable=etc/randomtable ? ? ?
In the pkginfo I have added: CLASSES=�none build�
Content of etc/randomtable in my build directory:
!install
# randomtable builder
if [ -f $PKG_INSTALL_ROOT/etc/randomtable ]; then
echo "/etc/randomtable is already in place.";
else
echo "# /etc/randomtable" > /etc/randomtable
echo "1121554 # first random number" >> /etc/randomtable
fi
!remove
# randomtable deconstructor
if [ -f $PKG_INSTALL_ROOT/etc/randomtable ]; then
# the file can be removed if it's unchanged
if [ egrep "first random number" /etc/randomtable ]; then
rm /etc/randomtable;
fi
fi
The error I got after running pkgadd on that package:
Modifying /etc/randomtable
/var/sadm/pkg/BPCttdb.2/save/build/etc/randomtable: !install: not found
/var/sadm/pkg/BPCttdb.2/save/build/etc/randomtable: !remove: not found
/var/sadm/pkg/BPCttdb.2/save/build/etc/randomtable: test: unknown operator first random number
pkgadd: ERROR: class action script did not complete successfully
Some links related to class action script for solaris build:
http://docs.sun.com/app/docs/doc/817-0406/6mg76stf7?a=view
http://dlc.sun.com/osol/docs/content/PACKINSTALL/ch5pkgcasestudies-80583.html#ch5pkgcasestudies-56
Thanks!

I looked at the build script (/usr/sadm/install/scripts/i.build and r.build), and didn't see anything that parses the "!" directive. I'm not very familiar with build scripts, and the documentation is actually inherited from the original SVR4 documentation (not originating from Sun). But in looking at an example of a script that uses the build class, it expects the first argument to be either "install" or "remove" when called. So your example would look like this below. Note that my comment about the escaped comment can be ignored. It's surrounded by quotes, so is okay.
if [ $1 = install ] ; then
# randomtable builder
if [ -f $PKG_INSTALL_ROOT/etc/randomtable ]; then
echo "/etc/randomtable is already in place.";
else
echo "# /etc/randomtable" > /etc/randomtable
echo "1121554 # first random number" >> /etc/randomtable
fi
else
# randomtable deconstructor
if [ -f $PKG_INSTALL_ROOT/etc/randomtable ]; then
# the file can be removed if it's unchanged
if \[ egrep "first random number" $PKG_INSTALL_ROOT/etc/randomtable \]; then
rm /etc/randomtable;
fi
fi
So basically the SVR4 Applications Developers Guide incorrectly tries to use the "!install" and "!remove" commands.
-- Alan
Edited by: alanst on Apr 4, 2008 12:26 PM

Similar Messages

  • Document Class / Action Script Help

    Dear all,
    From a tutorial page, i manage to built this flash page with
    xml capabilities. but when i add more scene to the flash page, i
    have errors like this.
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/init()
    at MyContent()
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/onComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    How do i edit the "MyContent.as" file so that i can add more
    scene to the flash.
    I understand that, once i put the "MyContent.as" in the
    document class, it will load immediately, is there any way to tell
    it to load only in scene 2 (which is where the xml is needed).
    Thanks. Any help will be very grateful.
    Attach is the actionscript

    other then defining the document class, can i "call up" the
    MyContent.as (external script) when needed?
    If this can be done, what must i do to add into the .fla file
    and the .as file..
    Sorry, i'm very new to AS3.
    Thanks!!!

  • Using mx components in Action Script project in Flash Builder

    Hi
    I have created an Action Script project in flash builder 4 and want to use a mx.controls.button.
    The as file looks like this:
    package
        import flash.display.Sprite;
        import mx.controls.Button;
        public class as_test_project extends Sprite
            public function as_test_project()
                var btn:Button = new Button();
                btn.label = "test";
                addChild(btn);
    I have added C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\src as a Source Path in the project settings. I have also added framework.swc to the library path.
    I still get errors like :
    Description    Resource    Path    Location    Type
    Unable to resolve resource bundle "core" for locale "en_US".    as_test_project        Unknown    Flex Problem
    Have then tried added various Bundles folders like
    C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\projects\framework\bundles
    to the source path and library path, but I still get the errors.
    WHAT IS THE CORRECT WAY OF USING MX COMPONENTS IN A PURE ACTION SCRIPT PROJECT ?
    If I want to use th fl.controls componets instead but dont have CS3 where can I download them ?

    Thank you for your quick reply.
    But how then can I obtain the fl.controls components and use them in an Action
    Script project in Flash Builder 4?
    I don't have CS3 or CS4 (the flash authoring tool) installed.
    Is there an SWC somewhere to be downloaded?

  • Is Import to DRM by action script the only way to build hierarchies?

    Hi,
    If I am getting by source file as a big generation wise excel format and even properties in excel sheet with large number of custom property field values.
    Is making a Import action script out of the excel to load to DRM is the only way, or do we hav any other option to load these hierechies to DRM from excel without going fpr manual efforts in making scripts one by one for large no of dimensions.

    hi, the import functionality can build hierarchies. It has a draw back of only building NEW hierarchies. So if your source master hierarchy is external to DRM, action script or API is best way, if it is to be automated. If this is only be imported/updated once a month the import can be used to create the "new" version. You can use then blend update your old version.

  • Flex with any ORM - Writing Model classes and action scripts redundant?

    Hi,
    I am using Hibernate with Flex. I have all my model classes
    as POJOs. Now if i have to access these POJOs directly from flex, I
    need to write action script reference classes for all my POJO model
    classes. Since mapping POJOs with action script reference classes
    is so mechanical, i am wondering if there is any tool to read all
    the properties from the POJO's and convert them to action script
    reference classes automatically. Is there any way that this can be
    automated?
    Thanks in advance.
    Chandu.

    If you use Granite Data Services, there's something called
    "gas3" (I think is the name). You may be able to use it even if you
    don't use Granite.
    I didn't care for learning how to use it (plus it uses
    Groovy, more needless stuff to learn I guess), so I can't say how
    well it works. I just wanted a simple custom ant task that
    generates ActionScript classes for my Java classes. So I ended up
    making my own. It's definitely not trivial but it's not that hard
    if you're very good with Java and reflection.

  • How use flex sdk 3.5 Action Script-3 code in flash builder 4.5............???

    hiiiiiiiiiiiiiiiiii
    can i use my flax sdk 3.5 action script-3 code into flash builder 4.5 .....if yes so plz give me detail how??..with step....

    Ya i tried by keeping <fx:Declarations> part but still it is throwing error,
    In flex3 we are making a component ex: <mx:canvas> and changeing that component to
    <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:cairngorm="com.adobe.cairngorm.business.*">
    </cairngorm:ServiceLocator>
    if any one used 4.5 with cairngorm let me know
    thanks

  • Draw line in Action Script project in Flash Builder (Gumbo).

    Hi
    I am working on drawing tool application and want to draw line and rectangle in Action Script project in Flash Builder (Gumbo). Please guide and help me with an example.
    Thanks
    Rangrajan.

    This should be helpful http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7dd9.html

  • After action script for Solaris

    Hi,
    I'm having trouble with an after action script for the solaris box.
    my script reads..
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    <ResourceAction name='after-create'>
    <ResTypeAction restype='Solaris' timeout='60000'>
    <act>
    #!/bin/ksh
    echo "$WSUSER_accountId says Hello World!"
    PATH=/usr/lib/nis:$PATH; export PATH
    nisaddcred -p [email protected] -P keerthi2.example.com. des
    exit 0
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>
    I have edited the tabbed user form to include the following field:
    <Field name='global.create after action'>
    <Expansion>
    <s>after-create</s>
    </Expansion>
    </Field>
    Now when i am trying to create a user in my IDM n assigning the Solaris resource i'm getting the following error..
    com.waveset.util.WavesetException: An error occurred adding user 'client1' to resource 'Solaris Client'. com.waveset.util.WavesetException: Script failed waiting for "_,)#+(:" in response "" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "".
    the account is created in IDM.
    please help me out!
    Regards
    Sanjeev

    Hi-
    Did you ever get a resolution to this issue? I am seeing the exact same error in IDM 8.0 patch 3
    Error
    com.waveset.util.WavesetException: An error occurred adding user 'testusr15' to resource 'idm_client'. com.waveset.util.WavesetException: Script failed waiting for "$" in response "_,)#+(:" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "_,)#+(:".
    My action script looks like this:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    <ResourceAction name='after-create-nppasswd'>
    <ResTypeAction restype='Solaris'>
    <act>
    #!/bin/sh
    touch /tmp/idmtest
    release=`uname -r`
    if [ $release != "5.10" ]; then
         passwd -l $WSUSER_accountId
         sed "s/$WSUSER_accountId:\*LK\*/$WSUSER_accountId:NP/" /etc/shadow > /etc/shadow.new
         mv /etc/shadow.new /etc/shadow
    else
         passwd -N $WSUSER_accountId
    fi
    exit 0
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>

  • I need a mechanism to expose action script class reference to java script

    I need a mechanism to expose action script class reference to java script

    Adobe, I think, are quite happy leaving the StageWebView as a highly efficient and low-level component accessing native functionality, so I wouldn't hold my breath on them extending it.
    That said, I believe somebody did implement an ANE that gives much more access and, according to the docs, does allow Javascript access.
    See UIWebView as per this thread; http://forums.adobe.com/message/4832821#4832821
    http://darkredz.com/ios-uiwebview-and-videoplayer-native-extension-for-air-mobile/
    G

  • Creating a action script class for a flex component

    Hi,
    I am new to flex.
    I have designed a flex component into that I have 4 action script function. I have to write all those function in a separate action script class.
    Can anyone tell me how to do that?
    Thanks,
    Tushar

    I'm not sure I understand the question.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Error in phase of assigniment Action Script

    Hello Guys!
    I created the following action script named "sketch.as" :
    package
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import com.adobe.images.JPGEncoder;
    public class sketch extends Sprite {
    public function sketch():void {
    //this is your documentclass constructor
    stage.addEventListener(MouseEvent.MOUSE_MOVE, moveCursor);
    Mouse.hide();
    function moveCursor(event:MouseEvent):void
        pencil.x = event.stageX;
        pencil.y = event.stageY;
    var canvas_mc:MovieClip = new MovieClip()
    addChildAt(canvas_mc, 0);
    canvas_mc.swapDepths
    function sketch()
    canvas_mc.graphics.beginFill(0xFFFFFF);
    canvas_mc.graphics.drawRect(0, 0, 600, 500);
    canvas_mc.graphics.endFill();
    canvas_mc.addEventListener(MouseEvent.MOUSE_DOWN, startDrawing);
    canvas_mc.addEventListener(MouseEvent.MOUSE_UP, stopDrawing);
    canvas_mc.addEventListener(MouseEvent.MOUSE_MOVE, makeLine);
    function startDrawing(event:MouseEvent):void{
    canvas_mc.graphics.lineStyle(1, 0, 1);
    canvas_mc.graphics.moveTo(mouseX, mouseY);
    canvas_mc.addEventListener(MouseEvent.MOUSE_MOVE, makeLine);
    function stopDrawing(event:MouseEvent):void{
    canvas_mc.removeEventListener(MouseEvent.MOUSE_MOVE, makeLine);
    function makeLine(event:MouseEvent):void{
    canvas_mc.graphics.lineTo(mouseX, mouseY);
    sketch();
    var serverPath:String = "";
    function createJPG(m:MovieClip, q:Number, fileName:String)
    var jpgSource:BitmapData = new BitmapData (m.width, m.height);
    jpgSource.draw(m);
    var jpgEncoder:JPGEncoder = new JPGEncoder(q);
    var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
    var header:URLRequestHeader = new URLRequestHeader ("Content-type", "application/octet-stream");
    var jpgURLRequest:URLRequest = new URLRequest ( serverPath+"jpg_encoder_download.php?name=" + fileName + ".jpg");
    jpgURLRequest.requestHeaders.push(header);
    jpgURLRequest.method = URLRequestMethod.POST;
    jpgURLRequest.data = jpgStream;
    var jpgURLLoader:URLLoader = new URLLoader();
    //jpgURLLoader.load(jpgURLRequest);
    navigateToURL(jpgURLRequest, "_blank");
    save_btn.addEventListener(MouseEvent.CLICK, saveBtnPress);
    save_btn.addEventListener(MouseEvent.ROLL_OVER, saveBtnOver);
    save_btn.addEventListener(MouseEvent.ROLL_OUT, saveBtnOut);
    function saveBtnPress(e:Event):void
    createJPG(canvas_mc, 90, "sketch");
    function saveBtnOver(e:Event):void
    Mouse.show();
    pencil.visible = false;
    function saveBtnOut(e:Event):void
    Mouse.hide();
    pencil.visible = true;
    Lately I created a file .fla in the same root of the file .as naming it "sketch.fla"
    When I try, in the Adobe Flash CS4 Professional screen, to assign to  ".fla" in the properties Publish my action script, the following message appears:
    “A definition for the document class could not be found in the classpath, so one will be automatically generated in tha SWF file upon export.”
    Obviously, it doesn’t function
    Could somebody help me??

    i don't understand, "When I try, in the Adobe Flash CS4 Professional screen, to assign to   ".fla" in the properties Publish my action script, the following message  appears:"
    but i do understand that error message.  you need to assign the document class for your fla.  in the properties panel with the backstage selected, assign sketch in the class or document class field.

  • Difference in using the same component made in mxml or action-script

    Hi,
    I made a sample project to show a kind of bug in the SuperTabNavigator component of FlexLib
    In this sample you can see that using the same component (made in both mxml or action-script) can make a difference
    I'm just wondering why ?
    Thanks
    Here is what i've posted :
    What steps will reproduce the problem?
    1. Create a button to dynamically add new tab with icon on a SuperTabNavigator
    2. Click on this button to add new tabs
    What is the expected output?
    - The expected output is tabs added without abnormal behavior
    What do you see instead?
    - Every time a new tab is created the one who had the focus has its content
    (icon + label) moving from the top-left of the tab to its original position
    Please provide any additional information below.
    Configuration:
    - Flex Builder 3 in Eclipse
    - FlexLib 2.3
    Sample:
    (see attached file)
    There is two type of tab, one in action-script and one in mxml
    They both are equal
    - Adding a new action-script tab to SuperTabNavigator works fine
    - Adding the same tab but an mxml one doesn't
    - Adding a new action-script or mxml tab to TabNavigator works fine
    -> meanings that the issue comes with SuperTabNavigator
    - Adding a new mxml tab to both SuperTabNavigator and TabNavigator at the
    same time makes TabNavigator to get the same bad behavior
    Remarks:
    - Tried everything but i'm really stuck
    - Weirdly, removing the PopUpButton correct the issue
    - In the same way if you keep adding action-script tab it automatically scroll to the
    last tab. And if you do the same with mxml tab then it add the tab at the end and
    scroll to the first one.
    => what could be the difference between using action-script or mxml object ?

    Here is one possible solution:
    You can use the ExternalInterface (
    http://livedocs.macromedia.com/flex/2/langref/flash/external/ExternalInterface.html)
    class to communicate with JavaScript. JavaScript can then popup the
    media player very easily like this:
    http://www.webreference.com/programming/javascript/jf/column5/index.html
    The documentation on the ExternalInterface class has a nice
    example (in the bottom of the page) on how to communicate with
    JavaScript in a browser. Hope this helps,
    -george

  • How move main class to script in timeline

    hi , in some component they use main class to load various as files
    and when i see properties of my document i see the name of this class right down the Script : Action Script 3
    whe i click on the pen ( edit ) of this class i see various codes about doing importing some AS files and ...
    for example :
    package {
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.net.URLRequest;
        import flash.net.URLLoader;
        import flash.events.*;
        import com.Align;
        public class DocumentClass extends MovieClip {
            private var ***;
            public var ***;
            public var ***;
            public function DocumentClass() {
            private function config():void {
    sometimes i want to use 2 or more component that use this technics and i can only choose and type the name one of them !! 
    how can i put them all together or it will be better if possible to put class in script in timeline ...

    thanks Mr.Murphy
    i try to remove package , private , public from class and move it to timeline as Script but no success at all !!
    here is the Code and my menu :
    http://www.jeffguthrie.com/drop-down-menu-with-as3
    and here what i made at end :
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    import com.greensock.*;
    import com.greensock.easing.*;
             var _sMouseOver:MovieClip;
             var _sMenu:MovieClip;
             var _menuTimer:Timer;
             var _menuOpen:Boolean = false;
            function MouseOverMenu():void {
                addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
            function init(e:Event):void {
                _sMouseOver.buttonMode = true;
                _sMouseOver.addEventListener(MouseEvent.MOUSE_OVER, showMenu, false, 0, true);
                _sMouseOver.addEventListener(MouseEvent.MOUSE_OUT, startClose, false, 0, true);
                _sMouseOver.addEventListener(MouseEvent.MOUSE_OVER, cancelClose, false, 0, true);
                _menuTimer = new Timer( 50 );
                _menuTimer.addEventListener ( TimerEvent.TIMER, doCloseMenu );
                _sMenu.visible = false;
                _sMenu.alpha = 0;
                _sMenu.addEventListener(MouseEvent.MOUSE_OUT, startClose, false, 0, true);
                _sMenu.addEventListener(MouseEvent.MOUSE_OVER, cancelClose, false, 0, true);
             function showMenu(e:MouseEvent):void {
                _menuOpen = true;
                _sMenu.visible = true;
                TweenLite.to(_sMenu, .5, {y:73, alpha:1});
             function startClose ( e:Event ):void {
                //trace('startClose ' + e.target);
                _menuTimer.start();
             function cancelClose ( e:Event ):void {
                //trace('cancelClose ' + e.target);
                _menuTimer.stop();
             function doCloseMenu ( e:Event ) {
                closeMenu();
             function closeMenu ():void {
                if ( _menuOpen ) {
                    TweenLite.to(_sMenu, .5, {y:50, alpha:0, onComplete: hideMenu});
                _menuTimer.stop();
                _menuOpen = false;
             function hideMenu():void {
                _sMenu.visible = false;
    i really need this and i cant use Document class , thanks

  • How to refer a base class action directly

    Hi ,
    I have a jsp associated to controller b which extends controller a.
    There is an action in controller a.
    From the jsp it self(With out coming to the controller b ) can i refer an action in controller A.

    Hi,
    You can achieve this via Workshop 9.2 by using the exported Ant script for your project as follows:
    -Ensure that all Jars needed to resolve com.bea.p13n.property.EntityPropertyManager (this particular class is found in weblogic92/common/p13n/lib/p13n_ejb.jar) and all referenced classes are added to the Java build path for your WebLogic EJB project (Properties->Java Build Path->Libraries)
    -Export the "Workshop Ant Script" for your WebLogic EJB project (File->Export->Workshop Ant Script); this will generate a "build.xml" Ant script under your project root directory.
    -Edit this default build script as follows: in the call to the "ejbgen" task within the "build" target, add the attribute: propertyFile="ejbgen.properties"
    -Create a file "ejbgen.properties" under the root of your WebLogic EJB project and add the following entry:
    YourSessionBeanClassName.remote.baseClass=com.bea.p13n.property.EntityPropertyManager
    -Add a "<path refid="java.classpath"/>" within the "<classpath>" for the "java" task element that calls "weblogic.ejbc" (this will ensure that the p13n classes are resolved by EJBC)
    Follow the instructions for executing the Ant build script found here: http://edocs.bea.com/workshop/docs92/ws_platform/ideuserguide/conUseCustomAntBuild.html
    For more information on the EJBGen property file support, see: http://e-docs.bea.com/wls/docs92/ejb/EJBGen_reference.html

  • Mapping action script object to mx:model object

    Hi all,
    I am having an action script class and an mx:model element
    with same elements. I want to assign an action script object to
    this mx:model. How can I do that one?
    Let me state it clearly.
    Say, my action script class contains two elements - user and
    rollno with required getter and setter methods.
    And I am having an mx:model element with the following
    format.
    <mx:model id="data">
    <data>
    <user/>
    <rollno/>
    </data>
    </mx:model>
    I want to assign an instance of action script class to this
    model object.
    I tried extending action action script class from Objectproxy
    and used data=actionscriptinstance.
    But it's not working properly.
    Is there anyway I can do this one?
    Thanks in advance

    The quick answer:
    <mx:model id="data">
    <data>
    <user>{ myASObj.user }</user>
    <rollno>{ myASObj.rollNo}</rollno>
    </data>
    </mx:model>
    The bigger question might be, "Why have the mx:Model?"
    The Model tag is all Strings, so you lose data typing.
    Why not just create a value object (VO) for your user data
    and pass that around?
    package samples.user {
    [Bindable]
    [RemoteClass(alias="samples.user.User")]
    public class User {
    public var user:String;
    public var rollNo:int;
    Then when the result data returns, cast to the VO.
    public var user:User = (eventObj.result as User)

Maybe you are looking for