[BACK]Return to dhcpd6 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

File: [cvs.NetBSD.org] / src / etc / rc.d / dhcpd6 (download)

Revision 1.1, Fri Dec 29 18:15:49 2017 UTC (14 months, 3 weeks ago) by is
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, HEAD

Add startup file for dhcp v6 with builtin isc-dhcp. Alas, this needs to
be a seperate process. On the positive side: this can't break the dhcpd
for IPv4 when tested.

#!/bin/sh
#
# $NetBSD: dhcpd6,v 1.1 2017/12/29 18:15:49 is Exp $
#

# PROVIDE: dhcpd6
# REQUIRE: DAEMON
# BEFORE:  LOGIN

$_rc_subr_loaded . /etc/rc.subr

name="dhcpd6"
rcvar=$name
command="/usr/sbin/dhcpd"
start_precmd="dhcpd6_precmd"
pidfile="/var/run/${name}.pid"
required_files="/etc/${name}.conf"

dhcpd6_precmd()
{
        if [ ! -e "/var/db/${name}.leases" ]; then
                echo "Creating /var/db/${name}.leases"
                touch /var/db/${name}.leases
        fi
}

load_rc_config $name
dhcpd6_flags="-6 $dhcpd6_flags"
run_rc_command "$1"