Fix process
This commit is contained in:
parent
c9e4aa3279
commit
dbfd12ec9d
2 changed files with 18 additions and 14 deletions
|
@ -71,14 +71,16 @@ sub do_work ($$$@)
|
|||
return $err;
|
||||
}
|
||||
|
||||
my $ret;
|
||||
eval {
|
||||
return $subref->($given_args, $args);
|
||||
$ret = $subref->($given_args, $args);
|
||||
};
|
||||
if ($@) {
|
||||
my $err = $@;
|
||||
log ERROR, $err;
|
||||
return $err;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
sub register_no_parse ($$;$)
|
||||
|
@ -92,14 +94,16 @@ sub register_no_parse ($$;$)
|
|||
$worker->job_servers('gearmand:4730');
|
||||
$worker->register_function($funcname => sub
|
||||
{
|
||||
my $ret;
|
||||
eval {
|
||||
return $subref->($given_arg, $_[0]{argref});
|
||||
$ret = $subref->($given_arg, $_[0]{argref});
|
||||
};
|
||||
if ($@) {
|
||||
my $err = $@;
|
||||
log ERROR, $err;
|
||||
return $err;
|
||||
}
|
||||
return $ret;
|
||||
});
|
||||
|
||||
# Disable exit on warning or error
|
||||
|
|
|
@ -5,7 +5,18 @@ DEB_PACKAGES_LIST="screen libnet-ldap-perl libxml-libxml-perl libgearman-client-
|
|||
ARCH_PACKAGES_LIST="screen perl-io-socket-ssl perl-email-simple perl-email-mime perl-term-readkey perl-ldap perl-lwp-protocol-https"
|
||||
FBSD_PACKAGES_LIST="screen p5-IO-Socket-SSL p5-Email-Simple p5-Email-MIME p5-Term-ANSIColor p5-Term-ReadKey p5-LWP-Protocol-https"
|
||||
|
||||
if [ -f "/etc/debian_version" ]
|
||||
if [ `uname -s` = "FreeBSD" ]
|
||||
then
|
||||
|
||||
for PK in $FBSD_PACKAGES_LIST
|
||||
do
|
||||
if ! pkg info "$PK" > /dev/null 2> /dev/null
|
||||
then
|
||||
PACKAGESITE="ttp://canon.acu.epita.fr/repo-lab" pkg install "$PK"
|
||||
fi
|
||||
done
|
||||
|
||||
elif [ -f "/etc/debian_version" ]
|
||||
then
|
||||
|
||||
if ! whereis dpkg > /dev/null 2> /dev/null
|
||||
|
@ -42,17 +53,6 @@ then
|
|||
fi
|
||||
done
|
||||
|
||||
elif [ -f "/etc/freebsd-update.conf" ]
|
||||
then
|
||||
|
||||
for PK in $FBSD_PACKAGES_LIST
|
||||
do
|
||||
if ! pkg info "$PK" > /dev/null 2> /dev/null
|
||||
then
|
||||
PACKAGESITE="ttp://canon.acu.epita.fr/repo-lab" pkg install "$PK"
|
||||
fi
|
||||
done
|
||||
|
||||
else
|
||||
|
||||
echo "Unknown operating system :("
|
||||
|
|
Reference in a new issue