App-GSD

 view release on metacpan or  search on metacpan

lib/App/GSD.pm  view on Meta::CPAN

    elsif (-x '/etc/init.d/network') {
        $cmd = ['/etc/init.d/network', 'restart'];
    }
    else {
        croak "I can't figure out how to restart your network.";
    }

    return $cmd;
}

# Try to invalidate nscd/unscd cache if present
sub _flush_nscd {
    my $self = shift;
    return if $^O ne 'linux';
    for my $nscd (qw(nscd unscd)) {
        # Ignore errors if the daemon is installed, but not running
        CORE::system("/usr/sbin/$nscd", '-i', 'hosts');
    }
    return;
}



( run in 0.523 second using v1.01-cache-2.11-cpan-a5abf4f5562 )