how to add new rc script with chkconfig on my octane - SGI

This is a discussion on how to add new rc script with chkconfig on my octane - SGI ; how to add new rc script (with chkconfig).. I want to basically make NIS client running by default on the boot.for that I thought I could use nsadmin and wrote a small bash script, which I basically want to put ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: how to add new rc script with chkconfig on my octane

  1. how to add new rc script with chkconfig on my octane

    how to add new rc script (with chkconfig)..
    I want to basically make NIS client running by default on the boot.for
    that I thought I could use nsadmin and wrote a small bash script, which
    I basically want to put as an rc script under /etc/init.d

    If any one has the details..can they please redirect me to the source
    of the information

    Regards,
    Nikhil


  2. Re: how to add new rc script with chkconfig on my octane

    ----- Original Message -----
    From:
    Newsgroups: comp.sys.sgi.admin
    Sent: Wednesday, September 21, 2005 5:54 PM
    Subject: how to add new rc script with chkconfig on my octane


    > how to add new rc script (with chkconfig)..


    chkconfig -f foobar on creates a new entry to the list and enable it.
    Another way is
    touch /etc/config/foobar
    echo on > /etc/config/foobar

    > I want to basically make NIS client running by default on the
    > boot.for


    In yourinit script use something like that.

    # IRIX chkconfig
    PROG=foobar
    IS_ON=/etc/chkconfig

    if $IS_ON verbose; then
    ECHO=echo
    else
    ECHO=:
    fi

    case "$1" in
    start)
    if $IS_ON $PROG; then
    // do something

    fi
    ;;

    restart)
    if $IS_ON $PROG; then
    // do something
    fi
    ;;

    stop)
    if $IS_ON $PROG; then
    // do something
    fi
    ;;

    *)
    echo "usage: $0 {start|stop|restart}"


    > that I thought I could use nsadmin and wrote a small bash script,
    > which
    > I basically want to put as an rc script under /etc/init.d


    After that create the symlinks in etc/rc2.d and etc/rc.d

    >
    > If any one has the details..can they please redirect me to the
    > source
    > of the information


    Just look to the init scripts which already comes with IRIX.

    regards
    Joerg

    --
    TakeNet GmbH Mobil: 0171/60 57 963
    D-97080 Wuerzburg Tel: +49 931 903-2243
    Alfred-Nobel-Straße 20 Fax: +49 931 903-3025



  3. Re: how to add new rc script with chkconfig on my octane

    Ah...Looks like no need to add an rc script, for making NIS client run
    by default..I need to
    make nsd on
    # chkconfig nsd on
    # nsadmin restart

    so NIS client runs by default ..

    But, details provided on adding rc script (may be sometime in the
    future) are appreciable.Thanks Everyone.


    Nikhil


+ Reply to Thread