--- dhcp-helper-1.1.orig/debian/conffiles +++ dhcp-helper-1.1/debian/conffiles @@ -0,0 +1,2 @@ +/etc/init.d/dhcp-helper +/etc/default/dhcp-helper --- dhcp-helper-1.1.orig/debian/prerm +++ dhcp-helper-1.1/debian/prerm @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ -x /usr/sbin/invoke-rc.d ] ; then + invoke-rc.d dhcp-helper stop || true +else + /etc/init.d/dhcp-helper stop || true +fi + +exit 0 + + --- dhcp-helper-1.1.orig/debian/default +++ dhcp-helper-1.1/debian/default @@ -0,0 +1,9 @@ +# Option flags used to start dhcp-helper. +# +# You will need at least "-s " or +# "-b so that dhcp-helper knows where +# to relay DHCP requests. +# +# See "man 8 dhcp-helper" for more details. + +DHCPHELPER_OPTS="-b eth0" --- dhcp-helper-1.1.orig/debian/init +++ dhcp-helper-1.1/debian/init @@ -0,0 +1,94 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: dhcp-helper +# Required-Start: $network $remote_fs $syslog +# Required-Stop: $network $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: DHCP relay agent +### END INIT INFO + +set +e + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="DHCP relay agent" +NAME=dhcp-helper +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +# Read config file if it is present. +if [ -r /etc/default/$NAME ] +then + . /etc/default/$NAME +fi + +# +# Function that starts the daemon/service. +# +d_start() { + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DHCPHELPER_OPTS +} + +# +# Function that stops the daemon/service. +# +d_stop() { + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + --name $NAME + rm -f $PIDFILE +} + +# Return +# 0 if daemon is running +# 1 if daemon is dead and pid file exists +# 3 if daemon is not running +# 4 if daemon status is unknown +d_status() { + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null + case "$?" in + 0) [ -e "$PIDFILE" ] && return 1 ; return 3 ;; + 1) return 0 ;; + *) return 4 ;; + esac +} + +case "$1" in + start) + echo -n "Starting $DESC: $NAME" + d_start + echo "." + ;; + stop) + echo -n "Stopping $DESC: $NAME" + d_stop + echo "." + ;; + restart|force-reload) + echo -n "Restarting $DESC: $NAME" + d_stop + sleep 1 + d_start + echo "." + ;; + status) + echo -n "Checking $DESC: $NAME" + d_status + case "$?" in + 0) echo " (running)" ; exit 0 ;; + 1) echo " (dead, pid file exists)" ; exit 1 ;; + 3) echo " (not running)" ; exit 3 ;; + *) echo " (unknown)" ; exit 4 ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 + exit 3 + ;; +esac + +exit 0 --- dhcp-helper-1.1.orig/debian/postinst +++ dhcp-helper-1.1/debian/postinst @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +update-rc.d dhcp-helper defaults >/dev/null + +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then + + if [ -x /usr/sbin/invoke-rc.d ] ; then + invoke-rc.d dhcp-helper start || true + else + /etc/init.d/dhcp-helper start || true + fi + +fi --- dhcp-helper-1.1.orig/debian/postrm +++ dhcp-helper-1.1/debian/postrm @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ purge = "$1" ]; then + update-rc.d dhcp-helper remove >/dev/null +fi --- dhcp-helper-1.1.orig/debian/copyright +++ dhcp-helper-1.1/debian/copyright @@ -0,0 +1,22 @@ +dhcp-helper is Copyright (c) 2004-2008 Simon Kelley + +It was downloaded from: http://www.thekelleys.org.uk/dhcp-helper/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991, or + (at your option) version 3 dated 29 June, 2007. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + +On Debian GNU/Linux systems, the text of the GNU general public license is +available in the file /usr/share/common-licenses/GPL-2 and +/usr/share/common-licenses/GPL-3 + +The Debian package of dhcp-helper was created by Simon Kelley. + + --- dhcp-helper-1.1.orig/debian/rules +++ dhcp-helper-1.1/debian/rules @@ -0,0 +1,86 @@ +#!/usr/bin/make -f +# debian/rules file - for dhcp-helper. +# Copyright 2004 by Simon Kelley +# Based on the sample in the debian hello package which carries the following: +# Copyright 1994,1995 by Ian Jackson. +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified + +package=dhcp-helper + +CFLAGS = $(shell export DEB_BUILD_OPTIONS=$(DEB_BUILD_OPTIONS); dpkg-buildflags --get CFLAGS) +CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS) +CFLAGS += $(shell dpkg-buildflags --get LDFLAGS) +CFLAGS += -Wall -W + +build: + $(checkdir) + make CC=gcc CFLAGS="$(CFLAGS)" + touch build + +clean: + $(checkdir) + rm -f build + rm -rf debian/tmp debian/*~ debian/files* debian/substvars + make clean + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + rm -rf debian/tmp + install -d debian/tmp/DEBIAN\ + -d debian/tmp/usr/sbin\ + -d debian/tmp/usr/share/doc/$(package)\ + -d debian/tmp/usr/share/man/man8\ + -d debian/tmp/etc/init.d\ + -d debian/tmp/etc/default\ + -d debian/tmp/var/run + install -m 644 debian/conffiles debian/tmp/DEBIAN + install -m 755 debian/postinst debian/postrm debian/prerm debian/tmp/DEBIAN + install -m 755 dhcp-helper debian/tmp/usr/sbin +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + strip -R .note -R .comment debian/tmp/usr/sbin/dhcp-helper +endif + install -m 755 debian/init debian/tmp/etc/init.d/dhcp-helper + install -m 644 debian/default debian/tmp/etc/default/dhcp-helper +ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) + cp CHANGELOG debian/tmp/usr/share/doc/$(package)/changelog + gzip -9 debian/tmp/usr/share/doc/$(package)/changelog + cp README debian/tmp/usr/share/doc/$(package)/README + gzip -9 debian/tmp/usr/share/doc/$(package)/README +endif + cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian + gzip -9 debian/tmp/usr/share/doc/$(package)/changelog.Debian + cp debian/copyright debian/tmp/usr/share/doc/$(package)/copyright + cp dhcp-helper.8 debian/tmp/usr/share/man/man8 + gzip -9 debian/tmp/usr/share/man/man8/dhcp-helper.8 + cd debian/tmp && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums + dpkg-shlibdeps debian/tmp/usr/sbin/dhcp-helper + dpkg-gencontrol -isp + chown -R root.root debian/tmp + chmod -R g-ws debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f dhcp-helper.c -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot + + --- dhcp-helper-1.1.orig/debian/changelog +++ dhcp-helper-1.1/debian/changelog @@ -0,0 +1,80 @@ +dhcp-helper (1.1-1) unstable; urgency=low + + * New upstream. + * Use dpkg-buildflags. + * Update conflicts to include isc-dhcp-server and isc-dhcp-relay. + * Bump Standards-version to 3.9.3 + + -- Simon Kelley Wed, 26 Jun 2012 20:40:36 +0000 + +dhcp-helper (1.0-1) unstable; urgency=low + + * New upstream. + + -- Simon Kelley Thu, 14 Aug 2008 17:10:16 +0000 + +dhcp-helper (0.8-1) unstable; urgency=low + + * New upstream. + * Include README in doc directory. + * Added nodocs support for DEB_BUILD_OPTIONS. + + -- Simon Kelley Thu, 21 Feb 2008 20:14:06 +0000 + +dhcp-helper (0.7-2) unstable; urgency=low + + * Handle DEB_BUILD_OPTIONS nostrip and noopt (closes: #436759) + * Provide md5sums. + * Provide "status" function in init script. + + -- Simon Kelley Thu, 9 Aug 2007 13:17:16 +0100 + +dhcp-helper (0.7-1) unstable; urgency=low + + * New upstream. + * Add LSB tags to init.d script. + + -- Simon Kelley Sat, 1 Jul 2006 18:24:06 +0100 + +dhcp-helper (0.6-1) unstable; urgency=low + + * New upstream. + * Bumped standards-version (no changes required). + + -- Simon Kelley Thur, 4 May 2006 15:28:33 +0100 + +dhcp-helper (0.5-1) unstable; urgency=low + + * New upstream. + + -- Simon Kelley Fri, 23 Mar 2006 17:58:43 +0100 + +dhcp-helper (0.4-1) unstable; urgency=low + + * New upstream. + * Removed postints bashism. + + -- Simon Kelley Fri, 17 Mar 2006 20:20:20 +0100 + +dhcp-helper (0.3-1) unstable; urgency=low + + * Bumped release to mark tweaks to packaging in preparation + * for entry into Debian proper. (closes: #320492) + + -- Simon Kelley Sun, 31 Jul 2005 10:15:20 +0100 + +dhcp-helper (0.2-1) unstable; urgency=low + + * Initial version + + -- Simon Kelley Mon, 29 Nov 2004 20:27:27 +0000 + + + + + + + + + + --- dhcp-helper-1.1.orig/debian/control +++ dhcp-helper-1.1/debian/control @@ -0,0 +1,22 @@ +Source: dhcp-helper +Section: net +Priority: optional +Maintainer: Simon Kelley +Standards-Version: 3.9.3 + +Package: dhcp-helper +Architecture: any +Depends: netbase, ${shlibs:Depends} +Conflicts: isc-dhcp-relay, dhcp3-relay, isc-dhcp-server, dhcp3-server, udhcpd +Description: A DHCP relay agent + dhcp-helper is a DHCP and BOOTP relay agent. It listens for DHCP + and BOOTP broadcasts on directly connected subnets and relays + them to DHCP or BOOTP servers elsewhere. dhcp-helper is much smaller + than dhcp3-relay package and it does not require the Packet Filter + kernel facility to be present. This makes it a good choice for use + on small or embedded systems. Unlike dhcp3-relay, dhcp-helper can be + configured to forward DHCP requests as broadcasts, and therefore does + not need to be given the IP address of the DHCP server, only the + network in which it resides. + + --- dhcp-helper-1.1.orig/debian/source/format +++ dhcp-helper-1.1/debian/source/format @@ -0,0 +1 @@ +1.0