From c9e5315352e2e5b399f7d946b0c8f9a9d99f9155 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 17 Oct 2012 16:30:32 +0000 Subject: (check_dhcp) make it work without global variable --- common/Wizcommon.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm index 5c14c545..088ba4c7 100644 --- a/common/Wizcommon.pm +++ b/common/Wizcommon.pm @@ -33,7 +33,8 @@ our @EXPORT = qw(check_started check_starts_on_boot test_host_domain); my $net; sub check_dhcp { - $net->is_dhcp and return 'dhcp_warning'; + my ($wiz) = @_; + $wiz->{net}->is_dhcp and return 'dhcp_warning'; } sub new { -- cgit v1.2.1