blob: e63f7ee9470b689b5d17de434d438a0fb4b1a916 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/bash
# Copyright (c) 2004-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Contributed by Roy Marples (uberlord@gentoo.org)
# Map the dns, ntp and nis info so our system module can apply the setup
export dns_domain_${interface}="${domain}"
export dns_servers_${interface}="${dns}"
export routers="${router}"
export ntp_servers_${interface}="${ntpsrv}"
export nis_domain_${interface}="${nisdomain}"
export nis_servers_${interface}="${nissrv}"
[[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh
RC_QUIET_STDOUT="yes"
"${svclib}/net.modules.d/helpers.d/dhcp" "$@"
if [[ $? == 0 ]] && [[ $1 == "bound" || $1 == "renew" ]] ; then
# Store the address in a cache for future usage
echo "${ip// /}" > "/var/cache/udhcpc-${interface}.lease"
chmod 600 "/var/cache/udhcpc-${interface}.lease"
fi
# vim: ts=4 :
|