How to check what rc scritps RAN at reboot - any log file ?

How to check what rc scritps RAN at reboot - any log file ?

Post by Wayne Bur » Fri, 11 Dec 1998 04:00:00



Hi,
I've created my own script that should run whenever my system reboots. I
created the original in /etc/init.d then linked it over to /etc/rc2.d.

If I run it by hand, everything works fine, however when the system
reboots, my scritps do not run. Is there any log file that shows the
status of each script as it starts at reboot, or any way I can setup such
a log file. In the HPUX world there's a rc.log file which shows this
info, but I can't seem to find it on my sun boxes.

Thanks in advance.

Wayne Burke.

 
 
 

How to check what rc scritps RAN at reboot - any log file ?

Post by Casper H.S. Dik - Network Security Engine » Fri, 11 Dec 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>I've created my own script that should run whenever my system reboots. I
>created the original in /etc/init.d then linked it over to /etc/rc2.d.
>If I run it by hand, everything works fine, however when the system
>reboots, my scritps do not run. Is there any log file that shows the
>status of each script as it starts at reboot, or any way I can setup such
>a log file. In the HPUX world there's a rc.log file which shows this
>info, but I can't seem to find it on my sun boxes.

What is teh name of the script s in /etc/rc2.d?

All names should start with a "S".

They must be /bin/sh scripts.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

How to check what rc scritps RAN at reboot - any log file ?

Post by Jeffrey Baile » Fri, 11 Dec 1998 04:00:00



> status of each script as it starts at reboot, or any way I can setup such
> a log file. In the HPUX world there's a rc.log file which shows this
> info, but I can't seem to find it on my sun boxes.

If you plan on sitting in front of the terminal during reboot, you can
easily put in an echo [ echo "I'm running" ] line in your script to see
if it fires off.

To see and save any error messages, you can also incorporate a logfile
into your script.

LOGFILE=/wherever you (or root, during bootup) have permission to write
your command >> $LOGFILE 2>&1 &

This might capture some error output to file, if in fact it is running.

However, what shell are you using?  What did you write it in?  When you
say ...

 >I've created my own script... Did you do a chmod +x?

 >If I run it by hand, everything works fine.....Are you running it as
yourself in your shell?  Try su - root and then see if it runs.

Been there, suffered that :-)

Jeff Bailey
ARL/PSU

Will work for project numbers or food.

 
 
 

How to check what rc scritps RAN at reboot - any log file ?

Post by Robert Web » Sat, 12 Dec 1998 04:00:00




Quote:

> What is teh name of the script s in /etc/rc2.d?

> All names should start with a "S".

... and all scripts starting with "K" are executed with
the argument "stop".

rweber

 
 
 

How to check what rc scritps RAN at reboot - any log file ?

Post by Andrew Gabri » Sat, 12 Dec 1998 04:00:00





>> status of each script as it starts at reboot, or any way I can setup such
>> a log file. In the HPUX world there's a rc.log file which shows this
>> info, but I can't seem to find it on my sun boxes.

>If you plan on sitting in front of the terminal during reboot, you can
>easily put in an echo [ echo "I'm running" ] line in your script to see
>if it fires off.

If I get a system which is* during startup, I often
add  set -x  at the top of the rc scripts until I narrow down
which one and where it's*.

who -d  will tell you if the top level rc scripts completed.

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

How to check what rc scritps RAN at reboot - any log file ?

Post by Wayne Bur » Sat, 12 Dec 1998 04:00:00



says...

thanks all for your suggestions, but I'm still scratching my head. The
script was created as root, and run as root. The permissions are 555, and
when I linked it to /etc/rc2.d, it was linked as S94start_ntp.sh The
script is run as /bin/sh also. It's contents are a total of 3 lines.

ntpdate server_name

wait 5 seconds

start up ntp, which I've created in /opt/local/bin.

No relative filenames, full path used for the commands.
Sun 5.5.1
Here's the scary part. Will run at boot up of 1 Sparc 20, and with
everything identical, will NOT run at boot up of 2 other Sparc 20's, same
OS, same patch level.

Like I said earlier, If I run by hand out of /etc/init.d as root, it
works beautifully, but not in /etc/rc2.d

Still scratching my noodle,
Wayne Burke

 
 
 

How to check what rc scritps RAN at reboot - any log file ?

Post by Bruce Porte » Tue, 15 Dec 1998 04:00:00


I'd look in /var/adm/messages or watch the console.
does the script start with
#!/bin/sh
if not that would be the reason , if it starts with #!/usr/bin/sh then
it may be because /usr is not yet mounted (althoutgh I it should be by
runlevel 2) , it would be best to post the script.


> Hi,
> I've created my own script that should run whenever my system reboots. I
> created the original in /etc/init.d then linked it over to /etc/rc2.d.

> If I run it by hand, everything works fine, however when the system
> reboots, my scritps do not run. Is there any log file that shows the
> status of each script as it starts at reboot, or any way I can setup such
> a log file. In the HPUX world there's a rc.log file which shows this
> info, but I can't seem to find it on my sun boxes.

> Thanks in advance.

> Wayne Burke.


--
Bruce
-----------------------------------------------
FIM#1
XJ900F , GS550E , GSX250

http://www.netcomuk.co.uk/~bdporter/index.htm
-----------------------------------------------
 
 
 

1. which user does /etc/rc.d/rc.local / rc.sysinit run as?

Im running Enigma and want to set up a systemwide fetchmail daemon ... I
have got the /root/.fetchmailrc file set up fine and need to know where
to put the 'fetchmail' command.

Should I put fetchmail somewhere in either /etc/rc.d/rc.local or
rc.sysinit?  Whereabouts should I put it in?  Are there security risks
here I should know about?

--
Cheers,
Glen

2. ksh command substitution

3. running Knn rc scripts after reboot command

4. C2 security, or similar one...

5. Check your ppp.log or ppp.tun0.log in /var/log

6. Multihop Ad-Hoc on Linux

7. running apps from /etc/rc.d/rc.local

8. All NCRc810 SCSI controllers equal?

9. Where's RedHat rc.inet1, rc.inet2 files??

10. /etc/rc.d/rc.sysinit: /proc/sys/kernel/sysrq: No such file or directory

11. REQUEST: /etc/rc.d/rc.inet2 file from 1.2.8 slackware

12. REQUEST for /etc(/rc.d/rc.*) files for SLIP connection

13. about rc.* & rc*.d files/dirs