e-smith-lib/root/sbin/e-smith/signal-event

25 lines
604 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/perl -w
#----------------------------------------------------------------------
# Copyright 1999-2003 Mitel Networks Corporation
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#----------------------------------------------------------------------
use strict;
use Getopt::Long;
use esmith::event;
my $usage = "usage:
$0 eventname [arg1 [arg2...]]
";
my ($event, @args) = @ARGV;
die $usage unless $event;
my $exitcode = event_signal($event, @args);
# reverse exitcode for command-line usage
exit ($exitcode ? 0 : 1);