From 28dd71ff97103901560035eae600198fdbc5b58e Mon Sep 17 00:00:00 2001 From: yjogol Date: Fri, 26 Feb 2010 05:59:54 +0000 Subject: [PATCH] Activate Wake on LAN (for CS) again (ybug 455) git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@418 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/nhttpd/web/Y_Settings_wol.yhtm | 2 +- src/nhttpd/web/Y_Tools_Check_Install.yhtm | 2 +- src/nhttpd/web/Y_Tools_Menue.yhtm | 5 ++--- src/nhttpd/web/scripts/Y_Tools.sh | 8 +++++++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/nhttpd/web/Y_Settings_wol.yhtm b/src/nhttpd/web/Y_Settings_wol.yhtm index b4788fb35..5e0771db8 100644 --- a/src/nhttpd/web/Y_Settings_wol.yhtm +++ b/src/nhttpd/web/Y_Settings_wol.yhtm @@ -41,7 +41,7 @@ function goto_settings(){ Wake on Lan MAC 3 ({=ini-get:/var/tuxbox/config/Y-Web.conf;wol_mac_3=}) {=ini-get:/var/tuxbox/config/Y-Web.conf;wol_desc_3=} - Einstellungen + {=L:settings=} diff --git a/src/nhttpd/web/Y_Tools_Check_Install.yhtm b/src/nhttpd/web/Y_Tools_Check_Install.yhtm index 06a285dac..cba153f9e 100644 --- a/src/nhttpd/web/Y_Tools_Check_Install.yhtm +++ b/src/nhttpd/web/Y_Tools_Check_Install.yhtm @@ -99,7 +99,7 @@ function do_check(){ ~ sLog_addRow(sLog_body, "green", "Programs: fcp is installed at: {=var-get:fcp=}. Image flashing is enabled.", "ok"); =} - {=var-set:etherwake={=if-file-exists:/bin/etherwake~/bin/etherwake~{=if-file-exists:/var/bin/etherwake~/var/bin/etherwake~false=}=}=} + {=var-set:etherwake={=if-equal:{=global-var-get:boxtype=}~coolstream~{=if-file-exists:/bin/ether-wake~/bin/ether-wake~{=if-file-exists:/var/bin/ether-wake~/var/bin/ether-wake~=}=}~{=if-file-exists:/bin/etherwake~/bin/etherwake~{=if-file-exists:/var/bin/etherwake~/var/bin/etherwake~=}=}=}=} {=if-equal:{=var-get:etherwake=}~false~ sLog_addRow(sLog_body, "red", "Programs: etherwake is not installed. Wake on LAN is disabled. "+y_url("Help-Tools-Wake_on_LAN"), "failed"); ~ diff --git a/src/nhttpd/web/Y_Tools_Menue.yhtm b/src/nhttpd/web/Y_Tools_Menue.yhtm index e7a714375..7d2915948 100644 --- a/src/nhttpd/web/Y_Tools_Menue.yhtm +++ b/src/nhttpd/web/Y_Tools_Menue.yhtm @@ -32,8 +32,7 @@ function init(){ {=var-set:automount={=if-file-exists:/sbin/automount~true~{=if-file-exists:/var/bin/automount~true~=}=}=} {=var-set:management={=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip;{=func:get_request_data client_addr=}=}~1~=}{=if-equal:{=func:get_request_data client_addr=}~{=ini-get:/var/tuxbox/config/Y-Web.conf;management_ip2=}~1~=}=} -{=var-set:etherwake={=if-file-exists:/bin/etherwake~/bin/etherwake~{=if-file-exists:/var/bin/etherwake~/var/bin/etherwake~=}=}=} - +{=var-set:etherwake={=if-equal:{=global-var-get:boxtype=}~coolstream~{=if-file-exists:/bin/ether-wake~/bin/ether-wake~{=if-file-exists:/var/bin/ether-wake~/var/bin/ether-wake~=}=}~{=if-file-exists:/bin/etherwake~/bin/etherwake~{=if-file-exists:/var/bin/etherwake~/var/bin/etherwake~=}=}=}=}

Tools

@@ -55,12 +54,12 @@ function init(){
  • AutoMounts
  • =}
  • Mounts
  • + ~=} {=if-empty:{=var-get:etherwake=}~
  • Wake on LAN
  • ~
  • Wake on LAN
  • =} - ~=} =}
  • Check Install
  • diff --git a/src/nhttpd/web/scripts/Y_Tools.sh b/src/nhttpd/web/scripts/Y_Tools.sh index ff0d390e3..2dbc78b15 100755 --- a/src/nhttpd/web/scripts/Y_Tools.sh +++ b/src/nhttpd/web/scripts/Y_Tools.sh @@ -436,7 +436,13 @@ proc() # ----------------------------------------------------------- wol() { - msg=`etherwake $1` + if [ -e /bin/etherwake ]; then + msg=`etherwake $1` + else + if [ -e /bin/ether-wake ]; then + msg=`ether-wake $1` + fi + fi msg="Wake on LAN $1

    $msg" y_format_message_html }