Dhcdbd

From CBLFS
Jump to navigationJump to search
Download Source: http://dcantrel.fedorapeople.org/dhcdbd/dhcdbd-2.10.tar.bz2

Introduction to Dhcdbd

Dhcdbd provides D-BUS control of the ISC dhclient provided by Dhcp.

Project Homepage: Unknown

Dependencies

Required

Non-Multilib

Compile the package:

make CC="gcc -DDHCDBD_DHCLIENT_LEASE_DIR=\\\"/var/state/dhcp/\\\" \
        -DDHCLIENT_EXTENDED_OPTION_ENVIRONMENT=0"

Install the package

make install

Multilib

This package does not install any libraries so only one installation is needed.

32Bit

Compile the package:

USE_ARCH=32 \
make CC="gcc ${BUILD32} -DDHCDBD_DHCLIENT_LEASE_DIR=\\\"/var/state/dhcp/\\\" \
        -DDHCLIENT_EXTENDED_OPTION_ENVIRONMENT=0"

Install the package

make install

N32

Compile the package:

USE_ARCH=n32 \
make CC="gcc ${BUILDN32} -DDHCDBD_DHCLIENT_LEASE_DIR=\\\"/var/state/dhcp/\\\" \
        -DDHCLIENT_EXTENDED_OPTION_ENVIRONMENT=0"

Install the package

make install

64Bit

Compile the package:

USE_ARCH=64 \
make CC="gcc ${BUILD64} -DDHCDBD_DHCLIENT_LEASE_DIR=\\\"/var/state/dhcp/\\\" \
        -DDHCLIENT_EXTENDED_OPTION_ENVIRONMENT=0"

Install the package

make install

Configuring

Bootscript

Create the bootscript:

cat > /etc/rc.d/init.d/dhcdbd << "EOF"
#!/bin/sh
# Begin $rc_base/init.d/dhcdbd

. /etc/sysconfig/rc
. ${rc_functions}

case "${1}" in
        start)
                boot_mesg "Starting dhcdbd..."
                loadproc /sbin/dhcdbd --system
                ;;

        stop)
                boot_mesg "Stopping dhcdbd..."
                killproc /sbin/dhcdbd
                ;;

        restart)
                ${0} stop
                sleep 1
                ${0} start
                ;;

        status)
                statusproc /sbin/dhcdbd
                ;;

        *)
                echo "Usage: ${0} {start|stop|restart|status}"
                exit 1
                ;;
esac

# End $rc_base/init.d/dhcdbd
EOF
chmod -v 754 /etc/rc.d/init.d/dhcdbd

Link it into the runlevels:

for link in /etc/rc.d/rc{{0,1,6}.d/K25,{2,3,4,5}.d/S25}dhcdbd; do
  ln -sfv ../init.d/dhcdbd $link;
done