rc boot script problem

Ask a Question related to Sun Solaris, Design and Development.

  1. #1

    Default rc boot script problem

    I have a reboot script, /etc/rc2.d/S99dbora.sh which is a link to
    /etc/init.d/dbora.sh. This script expects a "start" message from rc2 at
    boot time. The system is solaris 8, the inittab file is as the
    installation has created it. The script exects a "start" but instead
    received this "ufs".
    Is this an installation problem of the script itself?
    Any assistence or direction would be greatly appreciated.
    Thanks
    Ralph Mazza

    Ralph Mazza Guest

  2. Similar Questions and Discussions

    1. SWSTRTR.EXE Boot Up Problem
      When I reboot my PC as soon as I log on to to my User Account, an Error Message Box appears realting to problems with the swstrtr.exe file. I...
    2. aix 4.3.3 cdrom boot problem
      I have recently made a copy of the 4 x AIX 4.3.3 install disks so that I can install them onto my 43p-260. When I try to boot from disk 1 it does...
    3. script to run at boot
      Other Linuxes have a p;ace to put a file that is to be run after the usual bootup, where I can put extra commands that are also to be run at every...
    4. CD Boot Problem
      sounds like the cd media you burned has an error. this can be caused by a manufacturing error on the cd. burn another cdrom and give it a try. ...
    5. iMac boot up problem
      I have recently tried to upgrade a rev b iMac with a Western Digital 40gb drive. The drive is partitioned into an 8gb and 32 gb partitiion. So far...
  3. #2

    Default Re: rc boot script problem

    On Mon, 28 Jul 2003 20:48:31 +0000, Ralph Mazza wrote:
    > I have a reboot script, /etc/rc2.d/S99dbora.sh which is a link to
    > /etc/init.d/dbora.sh. This script expects a "start" message from rc2 at
    > boot time. The system is solaris 8, the inittab file is as the
    > installation has created it. The script exects a "start" but instead
    > received this "ufs".
    > Is this an installation problem of the script itself?
    Two things. /etc/init.d/dbora.sh must have the executable bit set.
    Second /var/opt/oracle/oratab need to have the N replaced with Y.

    Dave Uhring Guest

  4. #3

    Default Re: rc boot script problem

    In article <3F258E53.AFBAC544@bellatlantic.net>,
    Ralph Mazza <rmazza@bellatlantic.net> wrote:
    >I have a reboot script, /etc/rc2.d/S99dbora.sh which is a link to
    >/etc/init.d/dbora.sh. This script expects a "start" message from rc2 at
    >boot time. The system is solaris 8, the inittab file is as the
    >installation has created it. The script exects a "start" but instead
    >received this "ufs".
    >Is this an installation problem of the script itself?
    >Any assistence or direction would be greatly appreciated.
    When a scriptname has a .sh suffix, it's executed using the syntax:

    .. <scriptname>

    rather than

    /sbin/sh <scriptname> start

    Bourne shell doesn't support passing arguments when executing scripts with
    ".".

    You should only use the .sh suffix if the script sets environment variables
    that must be preserved in the boot shell once the script finishes.
    Otherwise, just name it S99dbora, and it will receive the argument you
    expect.

    --
    Barry Margolin, [email]barry.margolin@level3.com[/email]
    Level(3), Woburn, MA
    *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
    Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
    Barry Margolin Guest

  5. #4

    Default Re: rc boot script problem


    "Ralph Mazza" <rmazza@bellatlantic.net> a écrit dans le message de news:
    [email]3F258E53.AFBAC544@bellatlantic.net[/email]...
    > I have a reboot script, /etc/rc2.d/S99dbora.sh which is a link to
    > /etc/init.d/dbora.sh. This script expects a "start" message from rc2 at
    > boot time. The system is solaris 8, the inittab file is as the
    > installation has created it. The script exects a "start" but instead
    > received this "ufs".
    > Is this an installation problem of the script itself?
    > Any assistence or direction would be greatly appreciated.
    > Thanks
    > Ralph Mazza
    >
    First I suggest you to confirm that your script is running correctly.
    So, to simulate the startup run, as root:

    /etc/rc2.d/S99dbora.sh start

    You may test also the stop part

    /etc/rc0.d/K??dbora.sh stop

    If this don't work, activate the traces "set -x" and see what is wrong.
    If not!, this should be a problem with the system. In this case check
    the /etc/inittab and the rc2 script itself



    M. Bouherrou Guest

  6. #5

    Default Re: rc boot script problem

    Dave Uhring <daveuhring@yahoo.com> wrote:
    > On Mon, 28 Jul 2003 20:48:31 +0000, Ralph Mazza wrote:
    >> I have a reboot script, /etc/rc2.d/S99dbora.sh which is a link to
    >> /etc/init.d/dbora.sh. This script expects a "start" message from rc2 at
    >> boot time. The system is solaris 8, the inittab file is as the
    >> installation has created it. The script exects a "start" but instead
    >> received this "ufs".
    >> Is this an installation problem of the script itself?
    > Two things. /etc/init.d/dbora.sh must have the executable bit set.
    That's not the problem. Execute bits on startup scripts only help
    admins that want to run them by hand. The startup process never 'runs'
    a startup script, it passes it as an argument to /bin/sh, so the execute
    bit is not required.

    *) /sbin/sh $f start ;;

    *however*, there is a special case when the script has a filename ending
    with ".sh". Here the script is not run in a separate shell, but is
    sourced directly into the running startup controller process. No 'stop'
    or 'start' argument will be seen by the script.

    *.sh) . $f ;;

    If the OP needs this script to respond to 'start' or 'stop', he probably
    want it to run in a normal subshell, and so should remove the '.sh'
    ending from the filename.

    --
    Darren Dunham [email]ddunham@taos.com[/email]
    Unix System Administrator Taos - The SysAdmin Company
    Got some Dr Pepper? San Francisco, CA bay area
    < This line left intentionally blank to confuse you. >
    Darren Dunham Guest

  7. #6

    Default Re: rc boot script problem

    On Tue, 29 Jul 2003 18:48:19 +0000, Darren Dunham wrote:
    > If the OP needs this script to respond to 'start' or 'stop', he probably
    > want it to run in a normal subshell, and so should remove the '.sh'
    > ending from the filename.
    Thank you. I have never added .sh to any of my startup scripts, thus did
    not run into that problem.

    Dave Uhring Guest

  8. #7

    Default Re: rc boot script problem

    Ralph Mazza wrote:
    >
    > I have a reboot script, /etc/rc2.d/S99dbora.sh which is a link to
    > /etc/init.d/dbora.sh. This script expects a "start" message from rc2 at
    > boot time. The system is solaris 8, the inittab file is as the
    > installation has created it. The script exects a "start" but instead
    > received this "ufs".
    As noted the name shouldn't end with ".sh". It should also really
    be in /etc/rc3.d. What do you mean by 'but instead received this
    "ufs"'?

    -am © 2003
    Anthony Mandic Guest

  9. #8

    Default Re: rc boot script problem

    In article <3F27DC21.9AD8D142@hotmail.com>,
    Anthony Mandic <p5@hotmail.com> wrote:
    >Ralph Mazza wrote:
    >>
    >> I have a reboot script, /etc/rc2.d/S99dbora.sh which is a link to
    >> /etc/init.d/dbora.sh. This script expects a "start" message from rc2 at
    >> boot time. The system is solaris 8, the inittab file is as the
    >> installation has created it. The script exects a "start" but instead
    >> received this "ufs".
    >
    > As noted the name shouldn't end with ".sh". It should also really
    > be in /etc/rc3.d. What do you mean by 'but instead received this
    > "ufs"'?
    His script is presumably looking at $1 for a "start" or "stop" token, but
    got "ufs" instead. At the beginning of /etc/rc2 it does:

    set `/usr/bin/who -r`

    This will set $1 in the rc2 script. And since .sh scripts are executed in
    the same environment as the calling script, he's seeing that value.

    --
    Barry Margolin, [email]barry.margolin@level3.com[/email]
    Level(3), Woburn, MA
    *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
    Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
    Barry Margolin Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139