diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2013-03-18 18:29:36 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2013-08-13 16:33:41 -0500 |
commit | 838c9efb36b3b058c5a5b9d0e8c6d4d4789a44b9 (patch) | |
tree | 4d30e9357d1f666ea37186b8a95dbe83c86b4dc8 /net/dhcpcd.sh | |
parent | b2f8ac9382d5dad70181ef803a37f43896f5cb91 (diff) | |
download | openrc-838c9efb36b3b058c5a5b9d0e8c6d4d4789a44b9.tar.gz openrc-838c9efb36b3b058c5a5b9d0e8c6d4d4789a44b9.tar.bz2 openrc-838c9efb36b3b058c5a5b9d0e8c6d4d4789a44b9.tar.xz |
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/dhcpcd.sh')
-rw-r--r-- | net/dhcpcd.sh | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh deleted file mode 100644 index 2c0f919..0000000 --- a/net/dhcpcd.sh +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (c) 2007-2008 Roy Marples <roy@marples.name> -# Released under the 2-clause BSD license. - -dhcpcd_depend() -{ - after interface - program start dhcpcd - provide dhcp - - # We prefer dhcpcd over the others - after dhclient pump udhcpc -} - -_config_vars="$_config_vars dhcp dhcpcd" - -dhcpcd_start() -{ - local args= opt= opts= pidfile="/var/run/dhcpcd-${IFACE}.pid" new=true - eval args=\$dhcpcd_${IFVAR} - [ -z "${args}" ] && args=${dhcpcd} - - # Get our options - eval opts=\$dhcp_${IFVAR} - [ -z "${opts}" ] && opts=${dhcp} - - case "$(dhcpcd --version)" in - "dhcpcd "[123]*) new=false;; - esac - - # Map some generic options to dhcpcd - for opt in ${opts}; do - case "${opt}" in - nodns) - if ${new}; then - args="${args} -C resolv.conf" - else - args="${args} -R" - fi - ;; - nontp) - if ${new}; then - args="${args} -C ntp.conf" - else - args="${args} -N" - fi - ;; - nonis) - if ${new}; then - args="${args} -C yp.conf" - else - args="${args} -Y" - fi - ;; - nogateway) args="${args} -G";; - nosendhost) args="${args} -h ''"; - esac - done - - # Add our route metric if not given - case " $args " in - *" -m "*) ;; - *) [ "${metric:-0}" != 0 ] && args="$args -m $metric";; - esac - - # Bring up DHCP for this interface - ebegin "Running dhcpcd" - - eval dhcpcd "${args}" "${IFACE}" - eend $? || return 1 - - _show_address - return 0 -} - -dhcpcd_stop() -{ - local pidfile="/var/run/dhcpcd-${IFACE}.pid" opts= sig=SIGTERM - [ ! -f "${pidfile}" ] && return 0 - - ebegin "Stopping dhcpcd on ${IFACE}" - eval opts=\$dhcp_${IFVAR} - [ -z "${opts}" ] && opts=${dhcp} - case " ${opts} " in - *" release "*) sig=SIGHUP;; - esac - start-stop-daemon --stop --quiet --signal ${sig} --pidfile "${pidfile}" - eend $? -} |