Ask a Question related to Sun Solaris, Design and Development.
-
Ralph Mazza #1
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
-
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... -
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... -
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... -
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. ... -
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... -
Dave Uhring #2
Re: rc boot script problem
On Mon, 28 Jul 2003 20:48:31 +0000, Ralph Mazza wrote:
Two things. /etc/init.d/dbora.sh must have the executable bit set.> 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?
Second /var/opt/oracle/oratab need to have the N replaced with Y.
Dave Uhring Guest
-
Barry Margolin #3
Re: rc boot script problem
In article <3F258E53.AFBAC544@bellatlantic.net>,
Ralph Mazza <rmazza@bellatlantic.net> wrote:When a scriptname has a .sh suffix, it's executed using the syntax:>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.
.. <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
-
M. Bouherrou #4
Re: rc boot script problem
"Ralph Mazza" <rmazza@bellatlantic.net> a écrit dans le message de news:
[email]3F258E53.AFBAC544@bellatlantic.net[/email]...First I suggest you to confirm that your script is running correctly.> 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
>
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
-
Darren Dunham #5
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?That's not the problem. Execute bits on startup scripts only help> Two things. /etc/init.d/dbora.sh must have the executable bit set.
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
-
Dave Uhring #6
Re: rc boot script problem
On Tue, 29 Jul 2003 18:48:19 +0000, Darren Dunham wrote:
Thank you. I have never added .sh to any of my startup scripts, thus did> 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.
not run into that problem.
Dave Uhring Guest
-
Anthony Mandic #7
Re: rc boot script problem
Ralph Mazza wrote:
As noted the name shouldn't end with ".sh". It should also really>
> 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".
be in /etc/rc3.d. What do you mean by 'but instead received this
"ufs"'?
-am © 2003
Anthony Mandic Guest
-
Barry Margolin #8
Re: rc boot script problem
In article <3F27DC21.9AD8D142@hotmail.com>,
Anthony Mandic <p5@hotmail.com> wrote:His script is presumably looking at $1 for a "start" or "stop" token, but>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"'?
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



Reply With Quote

