Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I am new in SuSe. I created a script for automatic starting of Informix. The script works fine from command line. When I try to start Informix from YAST ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    5

    Question YAST system services (runlevel)

    Hello,
    I am new in SuSe. I created a script for automatic starting of Informix. The script works fine from command line.
    When I try to start Informix from YAST GUI, it also works, Informix is started, but it returns an error: /etc/init.d/informix returned nil (unpecified error) and in the column "Running" remains "No".
    The second attempt returns Success and "Yes" in the "Running" column.

    What am i doind wrong? The script listing follows here:
    #!/bin/bash

    #

    ### BEGIN INIT INFO

    # Provides: Informix

    # Required-Start: postfix

    # Required-Stop:

    # Default-Start: 2 3 5

    # Default-Stop: 0 6

    # Description: Starts and stops the IBM Informix Dynamic server and shutdown.

    ### END INIT INFO



    #test -s /etc/rc.status &&

    . /etc/rc.status

    rc_reset



    export LANG=C

    ##########

    ids=demo_on

    ##########



    # Set environment

    INFORMIXDIR=/home/informix

    export INFORMIXDIR

    INFORMIXSERVER=$ids

    export INFORMIXSERVER

    ONCONFIG=onconfig.$ids

    export ONCONFIG

    PATH=$PATH:/home/informix/bin

    export PATH

    #



    case "$1" in

    start)

    echo -n $"Starting IDS $ids: "

    $INFORMIXDIR/bin/oninit

    ret=$?

    [ $ret -eq 0 ] && rc_status -v;touch /var/lock/subsys/informix

    ;;

    stop)

    echo -n $"Shutting down IDS $ids: "

    $INFORMIXDIR/bin/onmode -ky

    ret=$?

    [ $ret -eq 0 ] && rc_status -v;rm -f /var/lock/subsys/informix

    ;;

    *)

    echo $"Usage: $prog {start|stop}"

    exit 1

    ;;

    esac

    rc_exit

  2. #2
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Just a guess. When starting the script as a service the directory/files should be owned by root or at least executable by root.

    Check ownership and permissions.

  3. #3
    Just Joined!
    Join Date
    Jan 2008
    Posts
    5
    The script iself is owned by root but directories/files in /home/informix should be owned by the user informix. It is not possible to change this.

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    What are the permissions. Is there a informax group? I still think it os a permissions problem but it could be a path problem Are all the paths you need defined when the runlevel is run. I know you are defining some in the script but is that all the ones you really need.

    Just throwing out possible problem areas....

    You might try on a board that specializes in Informix.

  5. #5
    Just Joined!
    Join Date
    Jan 2008
    Posts
    5
    I did not find any mistake. The script works and it returns exit code 0. Only Yast says this error for the first attempt.

Posting Permissions

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