[Summary]Equivalence of rc.local

From: Bo Kyoung Choi <bkchoi_at_palc.postech.ac.kr>
Date: Wed, 17 Jan 1996 10:32:21 +0900

Hi managers;

Thank you for quick and kind responses.
Here are summary;

Original Question:


> I use DEC 2100 AXP, DEC Unix 3.2b .
> I am trying to make boot time execution script, for example httpd.
> I tried to use /etc/inittab, but the httpd didn't work properly.
> In the SUN OS 4.1.3 I used before, there were rc.local for these purposes.
> Is there any equivalence in DEC Unix ?

Jim Wright wrote:

>sun uses a bsd-style startup sequence, dec uses sysv. put your startup
>and shutdown script in /sbin/init.d and put a link to it in /sbin/rc3.d
>so that it will be executed when entering or leaving run level 3. check
>the documentation for more info.

>% ls -l /sbin/rc3.d/S99LOCAL
>lrwxrwxrwx 1 root system 15 Nov 15 10:36 /sbin/rc3.d/S99LOCAL -> ../init.d/LOCAL
>% ls -l /sbin/init.d/LOCAL
>-r-xr-xr-- 1 root system 2607 Dec 12 23:15 /sbin/init.d/LOCAL
>% cat /sbin/init.d/LOCAL

#!/sbin/sh
#
# $Id: init-LOCAL,v 1.14 1995/12/08 00:17:32 root Exp $

PATH=/sbin:/usr/sbin:/usr/bin
export PATH

#
# Read configuration for general parameters
#
if [ -f /etc/rc.config ] ; then
        . /etc/rc.config
else
        echo "ERROR: /etc/rc.config defaults file MISSING"
fi

case "$1" in
'start')
        # start http daemon
        echo "httpd"
        /usr/local/www/httpd/httpd -d /usr/local/www/httpd

        # start license daemon, etc...

        ;;
'stop')
        # shut down http daemon
        if [ -z /usr/local/www/httpd/logs/httpd.pid ]
        then
                /bin/kill `cat /usr/local/www/httpd/logs/httpd.pid`
        fi

        # shut down others...

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




>Jim Wright Keck Center for Integrative Neuroscience
>jwright_at_phy.ucsf.edu Box 0444, Room HSE-802
>voice 415-502-4874 513 Parnassus Ave
>fax 415-502-4848 UCSF, San Francisco, CA 94143-0444
Received on Wed Jan 17 1996 - 02:57:44 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT