Closed Thread
Results 1 to 5 of 5

Thread: [SCRIT] - One execution

  1. #1
    admin_kusu is offline Junior Member
    Join Date
    March 6th, 2008
    Posts
    0
    Downloads
    0
    Uploads
    0

    Default [SCRIT] - One execution


    Hi,=20
    I need to rum some script right after the installation wa done.
    I use the script adding ngedit tool, however, the script are executed
    every boot.
    Are any mechanism to execute the script one time after the installation
    ?

    Regards,

    Agustin March <mailto:agustin.m.march@intel.com>=20
    Argentina Distributing Computing Solution=20
    =20



  2. #2
    admin_kusu is offline Junior Member
    Join Date
    March 6th, 2008
    Posts
    0
    Downloads
    0
    Uploads
    0

    Default [SCRIT] - One execution


    Hi Agustin

    How about just deleteing its self at the bottom of the script? That =
    would cause it to run one time.

    Was this added as a custom script in ngedit, or a kusu rc script?


    Mark

    -----Original Message-----
    From: kusu-users-bounces@osgdc.org
    [mailto:kusu-users-bounces@osgdc.org]On Behalf Of March, Agustin M
    Sent: Wednesday, February 27, 2008 3:25 PM
    To: kusu-users@osgdc.org
    Subject: [Kusu-users] [SCRIT] - One execution


    Hi,=20
    I need to rum some script right after the installation wa done.
    I use the script adding ngedit tool, however, the script are executed
    every boot.
    Are any mechanism to execute the script one time after the installation
    ?

    Regards,

    Agustin March <mailto:agustin.m.march@intel.com>=20
    Argentina Distributing Computing Solution=20
    =20

    _______________________________________________
    Kusu-users mailing list
    Kusu-users@osgdc.org
    http://mail.osgdc.org/mailman/listinfo/kusu-users


  3. #3
    admin_kusu is offline Junior Member
    Join Date
    March 6th, 2008
    Posts
    0
    Downloads
    0
    Uploads
    0

    Default [SCRIT] - One execution


    Mark,


    It was added as custom script in ngedit. I don't; know about kusu rc.=20
    Could you explain about the kusu rc? Is this tool intended for this use?

    Regards,
    Agustin

    -----Original Message-----
    From: kusu-users-bounces@osgdc.org [mailto:kusu-users-bounces@osgdc.org]
    On Behalf Of Mark Black
    Sent: Wednesday, February 27, 2008 6:59 PM
    To: Users of Kusu
    Subject: RE: [Kusu-users] [SCRIT] - One execution

    Hi Agustin

    How about just deleteing its self at the bottom of the script? That
    would cause it to run one time.

    Was this added as a custom script in ngedit, or a kusu rc script?


    Mark

    -----Original Message-----
    From: kusu-users-bounces@osgdc.org
    [mailto:kusu-users-bounces@osgdc.org]On Behalf Of March, Agustin M
    Sent: Wednesday, February 27, 2008 3:25 PM
    To: kusu-users@osgdc.org
    Subject: [Kusu-users] [SCRIT] - One execution


    Hi,=20
    I need to rum some script right after the installation wa done.
    I use the script adding ngedit tool, however, the script are executed
    every boot.
    Are any mechanism to execute the script one time after the installation
    ?

    Regards,

    Agustin March <mailto:agustin.m.march@intel.com>=20
    Argentina Distributing Computing Solution=20
    =20

    _______________________________________________
    Kusu-users mailing list
    Kusu-users@osgdc.org
    http://mail.osgdc.org/mailman/listinfo/kusu-users
    _______________________________________________
    Kusu-users mailing list
    Kusu-users@osgdc.org
    http://mail.osgdc.org/mailman/listinfo/kusu-users


  4. #4
    mikem's Avatar
    mikem is offline Project Moderator
    Join Date
    April 10th, 2008
    Posts
    22
    Blog Entries
    9
    Downloads
    0
    Uploads
    0

    Default [SCRIT] - One execution


    Hi Augustin,

    On Thu, 28 Feb 2008 04:04:11 -0800
    "March, Agustin M" <agustin.m.march@intel.com> wrote:

    > It was added as custom script in ngedit. I don't; know about kusu rc.
    > Could you explain about the kusu rc? Is this tool intended for this
    > use?

    There is a directory /etc/rc.kusu.d in which scripts can be placed.
    During boot a tool called kusurc is executed. kusurc looks
    in /etc/rc.kusu.d and executes any scripts it finds there.

    If we want a script to be only run once, we simply tell the script to
    remove itself at the end. An example of a bash script that does this is:

    #!/bin/bash

    # ... your code here ...

    rm $0 # this line removes this script

    You will also find Python files in /etc/rc.kusu.d. These files define a
    class KusuRC that inherits from kusu.core.rcplugin.Plugin. Objects of
    this class have an attribute called delete. If the delete attribute is
    set to True, the plugin will be deleted after kusurc executes it.

    Take a look at /etc/rc.kusu.d/S02KusuSSHHosts.rc.py for example. On
    line 18 you see self.delete = False. If this was set to True, this
    plugin would be removed.

    HTH
    Mike


  5. #5
    admin_kusu is offline Junior Member
    Join Date
    March 6th, 2008
    Posts
    0
    Downloads
    0
    Uploads
    0

    Default [SCRIT] - One execution


    Hi Mike,
    It is a good approach!
    Regards
    Agustin

    -----Original Message-----
    From: Mike Mazur [mailto:mmazur@osgdc.org]=20
    Sent: Thursday, February 28, 2008 10:38 AM
    To: Users of Kusu
    Cc: March, Agustin M
    Subject: Re: [Kusu-users] [SCRIT] - One execution

    Hi Augustin,

    On Thu, 28 Feb 2008 04:04:11 -0800
    "March, Agustin M" <agustin.m.march@intel.com> wrote:

    > It was added as custom script in ngedit. I don't; know about kusu rc.=20
    > Could you explain about the kusu rc? Is this tool intended for this
    > use?

    There is a directory /etc/rc.kusu.d in which scripts can be placed.
    During boot a tool called kusurc is executed. kusurc looks
    in /etc/rc.kusu.d and executes any scripts it finds there.

    If we want a script to be only run once, we simply tell the script to
    remove itself at the end. An example of a bash script that does this is:

    #!/bin/bash

    # ... your code here ...

    rm $0 # this line removes this script

    You will also find Python files in /etc/rc.kusu.d. These files define a
    class KusuRC that inherits from kusu.core.rcplugin.Plugin. Objects of
    this class have an attribute called delete. If the delete attribute is
    set to True, the plugin will be deleted after kusurc executes it.

    Take a look at /etc/rc.kusu.d/S02KusuSSHHosts.rc.py for example. On
    line 18 you see self.delete =3D False. If this was set to True, this
    plugin would be removed.

    HTH
    Mike


Closed Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts