FIX: small language typos

This commit is contained in:
Paolo Asperti 2017-10-08 19:41:59 +02:00
parent 2cfc4add84
commit 2786dfea1c
3 changed files with 9 additions and 9 deletions

View File

@ -10,9 +10,9 @@ use English;
my $db_hosts = esmith::DB::db->open('hosts') || die("Could not open e-smith db (" . esmith::DB::db->error . ")\n");
my $event = $ARGV [0];
my $event = $ARGV[0];
defined $ARGV[1] || die "No host specied";
defined $ARGV[1] || die "No host specified";
my $host = $ARGV[1];
reboot_host($host);
@ -26,7 +26,7 @@ sub reboot_host
# Reboot the host
#------------------------------------------------------------
my $h = $db_hosts->get($hostName) or die "No host record for user $hostName";
my $h = $db_hosts->get($hostName) or die "No host record for $hostName";
system("/usr/bin/sudo -u amgmt /usr/bin/ssh -o StrictHostKeyChecking=no amgmt\@$hostName /usr/bin/sudo /sbin/reboot") == 0
or die "Error rebooting $hostName";

View File

@ -10,9 +10,9 @@ use English;
my $db_hosts = esmith::DB::db->open('hosts') || die("Could not open e-smith db (" . esmith::DB::db->error . ")\n");
my $event = $ARGV [0];
my $event = $ARGV[0];
defined $ARGV[1] || die "No host specied";
defined $ARGV[1] || die "No host specified";
my $host = $ARGV[1];
shutdown_host($host);
@ -26,7 +26,7 @@ sub shutdown_host
# Shutdown the host
#------------------------------------------------------------
my $h = $db_hosts->get($hostName) or die "No host record for user $hostName";
my $h = $db_hosts->get($hostName) or die "No host record for $hostName";
system("/usr/bin/sudo -u amgmt /usr/bin/ssh -o StrictHostKeyChecking=no amgmt\@$hostName /usr/bin/sudo /sbin/poweroff") == 0
or die "Error shutting down $hostName";

View File

@ -10,9 +10,9 @@ use English;
my $db_hosts = esmith::DB::db->open('hosts') || die("Could not open e-smith db (" . esmith::DB::db->error . ")\n");
my $event = $ARGV [0];
my $event = $ARGV[0];
defined $ARGV[1] || die "No host specied";
defined $ARGV[1] || die "No host specified";
my $host = $ARGV[1];
wake_host($host);
@ -26,7 +26,7 @@ sub wake_host
# Wake up the host
#------------------------------------------------------------
my $h = $db_hosts->get($hostName) or die "No host record for user $hostName";
my $h = $db_hosts->get($hostName) or die "No host record for $hostName";
my $client = $h[0];
my $mac = $client->prop('MacAddress');
system("/sbin/ether-wake -i lan0 $mac") == 0