#!/home/product/code/webui-perl/bin/perl -T -I /home/product/code/firmware/current/lib/perl5
#SUDOER_USERS: nobody
#SUDOER_RUNAS_USERS: root, mta
#SUDOER_TAGS: NOPASSWD, EXEC
use strict;
use warnings;
use Barracuda::Sudo::Lib;
use Barracuda::Environment;
use IPC::Run qw(run);

=pod

=head1 NAME

get_remote_serial

=head1 DESCRIPTION

Functions as a wrapper for /home/product/code/firmware/current/bin/get_remote_serial.pl

=cut


my ($server) = get_argv(is_ip_address_or_hostname);
my $outfile = sudo_out();
my $cmd = "${Barracuda::Environment::path_firmware}/bin/get_remote_serial.pl";
my @args = ('-n', $server);

my $status = run([$cmd, @args], \undef, $outfile, $outfile);

exit !$status;

