/[vps]/baselayout-vserver/trunk/lib/rcscripts/net.modules.d/helpers.d/dhcp-state
Gentoo

Contents of /baselayout-vserver/trunk/lib/rcscripts/net.modules.d/helpers.d/dhcp-state

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Sat Sep 3 16:10:27 2005 UTC (9 years, 1 month ago) by hollow
File size: 851 byte(s)
import initial baselayout sources (1.12.0_pre8)
1 #!/bin/bash
2 # Copyright (c) 2005 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 # Contributed by Roy Marples (uberlord@gentoo.org)
6
7 MODULES_DIR="/lib/rcscripts/net.modules.d"
8 . /lib/rcscripts/sh/rc-services.sh
9 . "${MODULES_DIR}/helpers.d/functions"
10 conf=$(add_suffix "/etc/conf.d/net")
11 [[ -e ${conf} ]] && source "${conf}"
12
13 service="net.${interface}"
14
15 if [[ ${action} != "up" ]]; then
16 if service_starting "${service}" || service_started "${service}" ; then
17 mark_service_inactive "${service}"
18 fi
19 remove_state "${interface}" false
20 else
21 ! service_stopping "${service}" && mark_service_started "${service}"
22 fi
23
24 if [[ ${RC_AUTO_INTERFACE} == "yes" ]]; then
25 best_interface=$( select_best_interface )
26 apply_state "${best_interface}"
27 elif [[ ${action} == "up" ]]; then
28 apply_state "${interface}"
29 fi
30
31 # vim:ts=4

  ViewVC Help
Powered by ViewVC 1.1.20