aboutsummaryrefslogtreecommitdiff
path: root/net/pump.sh
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-03-18 18:29:36 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-08-13 16:33:41 -0500
commit838c9efb36b3b058c5a5b9d0e8c6d4d4789a44b9 (patch)
tree4d30e9357d1f666ea37186b8a95dbe83c86b4dc8 /net/pump.sh
parentb2f8ac9382d5dad70181ef803a37f43896f5cb91 (diff)
Remove gentoo's net.* scripts
It has been determined that it will be best for gentoo's net.* scripts to be in a separate package to allow independent development. This package will be called netifrc and maintained by Gentoo.
Diffstat (limited to 'net/pump.sh')
-rw-r--r--net/pump.sh59
1 files changed, 0 insertions, 59 deletions
diff --git a/net/pump.sh b/net/pump.sh
deleted file mode 100644
index ddd454cb..00000000
--- a/net/pump.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
-# Released under the 2-clause BSD license.
-
-pump_depend()
-{
- program /sbin/pump
- after interface
- provide dhcp
-}
-
-_config_vars="$_config_vars dhcp pump"
-
-pump_start()
-{
- local args= opt= opts=
-
- # Get our options
- eval opts=\$dhcp_${IFVAR}
- [ -z "${opts}" ] && opts=${dhcp}
-
- # Map some generic options to dhcpcd
- for opt in ${opts}; do
- case "${opt}" in
- nodns) args="${args} --no-dns";;
- nontp) args="${args} --no-ntp";;
- nogateway) args="${args} --no-gateway";;
- esac
- done
-
- # Add our route metric
- [ "${metric:-0}" != "0" ] && args="${args} --route-metric ${metric}"
-
- args="${args} --win-client-ident"
- args="${args} --keep-up --interface ${IFACE}"
-
- ebegin "Running pump"
- eval pump "${args}"
- eend $? || return 1
-
- _show_address
- return 0
-}
-
-pump_stop()
-{
- # We check for a pump process first as querying for status
- # causes pump to spawn a process
- start-stop-daemon --quiet --test --stop --exec /sbin/pump || return 0
-
- # Check that pump is running on the interface
- if ! pump --status --interface "${IFACE}" >/dev/null 2>&1; then
- return 0
- fi
-
- # Pump always releases the lease
- ebegin "Stopping pump on ${IFACE}"
- pump --release --interface "${IFACE}"
- eend $? "Failed to stop pump"
-}