Просмотр исходного кода

WoL when rebooting the HDMI switch
This is a hacky place to put that signal, but it is fine while we are mucking with the switch

Zachary Kotlarek 10 лет назад
Родитель
Сommit
286538e6df
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      dmx/HDMIctrl.pl

+ 7 - 1
dmx/HDMIctrl.pl

@@ -119,8 +119,14 @@ while (1) {
 			print STDERR 'State: ' . $state . "\n";
 			print STDERR 'State: ' . $state . "\n";
 		}
 		}
 
 
-		# Reboot before the first update to GAME
+		# Reboot the HDMI switch when first switching to GAME
 		if ($state eq 'GAME' && $lastBoot < $now - $BOOT_TIMEOUT) {
 		if ($state eq 'GAME' && $lastBoot < $now - $BOOT_TIMEOUT) {
+
+			# WoL the target machine
+			# This should probably happen elsewhere, but if we're hacking here anyway...
+			~/bin/video/wol/wol-game.sh
+
+			# Reboot the HDMI switch
 			$hdmi->send('REBOOT')
 			$hdmi->send('REBOOT')
 			  or die('Unable to write command to HDMI socket: ' . $state . ": ${!}\n");
 			  or die('Unable to write command to HDMI socket: ' . $state . ": ${!}\n");