initial commit of file from CVS for e-smith-lib on Wed 12 Jul 08:58:46 BST 2023
This commit is contained in:
24
root/sbin/e-smith/signal-event
Normal file
24
root/sbin/e-smith/signal-event
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/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);
|
||||
|
Reference in New Issue
Block a user