summaryrefslogtreecommitdiffstats
path: root/etc/rc.dhclient_cron
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.dhclient_cron')
-rw-r--r--etc/rc.dhclient_cron11
1 files changed, 5 insertions, 6 deletions
diff --git a/etc/rc.dhclient_cron b/etc/rc.dhclient_cron
index 77254ec..c57b15b 100644
--- a/etc/rc.dhclient_cron
+++ b/etc/rc.dhclient_cron
@@ -31,17 +31,16 @@
require_once("config.inc");
require_once("functions.inc");
-require_once("filter.inc");
-require_once("interfaces.inc");
/* invalidate cache */
vc_invalidate();
unlink_if_exists("/tmp/config.cache");
-foreach($config['interfaces'] as $interface) {
- $real_interface = $interface['if'];
- if($interface['ipaddr'] == "dhcp") {
+$iflist = get_configured_interface_with_descr();
+foreach($iflist as $ifname => $interface) {
+ $real_interface = get_real_interface($ifname);
+ if($config['interfaces'][$ifname]['ipaddr'] == "dhcp") {
$pid = find_dhclient_process($real_interface);
if($pid == 0 or !$pid) {
/* dhclient is not running for interface, kick it */
@@ -51,4 +50,4 @@ foreach($config['interfaces'] as $interface) {
}
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud