AUTOMATIC STARTUP OF DHCP SERVER

When you configure the DHCP service using dhcpmgr or dhcpconfig utilities, startup and shutdown scripts are created in appropriate directories. The default startup script for DHCP is present in /etc/init.d/dhcp and is shown here:

bash-2.03# cat /etc/init.d/dhcp 
#!/sbin/sh 
# 
# Copyright 1996-1999 by Sun Microsystems, Inc. 
# All rights reserved. 
# 
#ident  "@(#)dhcp      1.17    99/10/23 SMI" 

# Make sure that /usr is mounted 
[ ! -d /usr/bin ] &&& exit 1 

case "$1" in 
'start') 
        if [ --x /usr/lib/inet/in.dhcpd ]; then 
                 /usr/lib/inet/in.dhcpd > /dev/console 2>&1 
        fi 
        ;; 
'stop') 
        /usr/bin/pkill -x -u 0 in.dhcpd 
        ;; 
*) 
        echo "Usage: $0 { start | stop }" 
        exit 1 
        ;; 
esac 
exit 0 
bash-2.03# 

This is a simple script and is copied as /etc/rc3.d/S34dhcp ...

Get Solaris™ 8 Network Administrator Certification Training Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.