dhcpcd: update to 5.0.1, switch to OpenRC.

--HG--
extra : convert_revision : c04fe506ea2bf5df334fadc52f796ae3ea18fdcc
This commit is contained in:
Juan RP 2009-05-04 22:16:54 +02:00
parent 7217f85369
commit d406796eac
5 changed files with 68 additions and 20 deletions

20
templates/dhcpcd/INSTALL Normal file
View File

@ -0,0 +1,20 @@
#
# This script registers the dhcpcd service into the
# 'default' runlevel, as required by OpenRC.
#
case "${ACTION}" in
pre)
;;
post)
[ ! -x sbin/rc-update ] && exit 0
[ ! -x sbin/rc-service ] && exit 0
if sbin/rc-service -e udev; then
echo "Registering ${PKGNAME} OpenRC service..."
sbin/rc-update add ${PKGNAME} default
[ $? -ne 0 ] && exit $?
sbin/rc-update -u
fi
;;
esac

20
templates/dhcpcd/REMOVE Normal file
View File

@ -0,0 +1,20 @@
#
# This script unregisters the dhcpcd service from the
# 'default' runlevel, as required by OpenRC.
#
case "${ACTION}" in
pre)
[ ! -x sbin/rc-update ] && exit 0
[ ! -x sbin/rc-service ] && exit 0
if sbin/rc-service -e udev; then
echo "Unregistering ${PKGNAME} OpenRC service..."
sbin/rc-update del ${PKGNAME} default
[ $? -ne 0 ] && exit $?
sbin/rc-update -u
fi
;;
post)
;;
esac

View File

@ -1,16 +0,0 @@
#!/bin/sh
#
# PROVIDE: dhcpcd
# REQUIRE: network
# BEFORE: NETWORKING
# KEYWORD: shutdown
$_rc_subr_loaded . /etc/rc.subr
name=dhcpcd
rcvar=$name
command=/sbin/$name
pidfile=/var/run/${name}.pid
load_rc_config $name
run_rc_command "$1"

View File

@ -0,0 +1,24 @@
#!/sbin/runscript
#
#
command=/sbin/dhcpcd
command_args=-q
pidfile=/var/run/dhcpcd.pid
name="DHCP Client Daemon"
depend()
{
provide net
need localmount
use logger
after bootmisc modules
before dns
}
stop_pre()
{
if yesno $RC_GOINGDOWN; then
: ${stopsig:=SIGKILL}
fi
}

View File

@ -1,11 +1,11 @@
# Template file for 'dhcpcd'
pkgname=dhcpcd
version=5.0.0
version=5.0.1
distfiles="http://roy.marples.name/downloads/dhcpcd/dhcpcd-$version.tar.bz2"
build_style=gnu_makefile
short_desc="RFC2131 compliant DHCP client"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=dcd3e1e07b9ccbb7682562345cc2656c13a41892d44f4cd631c3541aab3ad407
checksum=8d2a8caa411edf18e9689e54242c6f9874e476e8c20b371e4f4627e9938f466b
long_desc="
dhcpcd is a RFC 2131 compliant DHCP client. It's also a RFC 3927 compliant
IPv4LL (aka ZeroConf) client.
@ -27,6 +27,6 @@ pre_configure()
post_install()
{
# Install the rc.d script
install -D -m755 ${FILESDIR}/dhcpcd ${DESTDIR}/etc/rc.d/dhcpcd
# Install the OpenRC service
install -D -m755 ${FILESDIR}/dhcpcd.rc ${DESTDIR}/etc/init.d/dhcpcd
}