From 2786dfea1ce80bfecb3173baa0b554f787d6060e Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Sun, 8 Oct 2017 19:41:59 +0200 Subject: [PATCH] FIX: small language typos --- root/etc/e-smith/events/actions/doraemon-reboot | 6 +++--- root/etc/e-smith/events/actions/doraemon-shutdown | 6 +++--- root/etc/e-smith/events/actions/doraemon-wake | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/root/etc/e-smith/events/actions/doraemon-reboot b/root/etc/e-smith/events/actions/doraemon-reboot index 5f02685..bd69800 100755 --- a/root/etc/e-smith/events/actions/doraemon-reboot +++ b/root/etc/e-smith/events/actions/doraemon-reboot @@ -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"; diff --git a/root/etc/e-smith/events/actions/doraemon-shutdown b/root/etc/e-smith/events/actions/doraemon-shutdown index 04d61c7..d298c1d 100755 --- a/root/etc/e-smith/events/actions/doraemon-shutdown +++ b/root/etc/e-smith/events/actions/doraemon-shutdown @@ -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"; diff --git a/root/etc/e-smith/events/actions/doraemon-wake b/root/etc/e-smith/events/actions/doraemon-wake index bb43cb6..1e47960 100755 --- a/root/etc/e-smith/events/actions/doraemon-wake +++ b/root/etc/e-smith/events/actions/doraemon-wake @@ -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