mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 10:51:12 +02:00
hdd_menu.cpp: kill hdidle if hddsleep is active
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -1377,7 +1377,7 @@ int CHDDDestExec::exec(CMenuTarget* /*parent*/, const std::string&)
|
|||||||
const char hdidle[] = "/sbin/hd-idle";
|
const char hdidle[] = "/sbin/hd-idle";
|
||||||
bool have_hdidle = !access(hdidle, X_OK);
|
bool have_hdidle = !access(hdidle, X_OK);
|
||||||
|
|
||||||
if (have_hdidle) {
|
if (have_hdidle && g_settings.hdd_sleep > 0) {
|
||||||
system("kill $(pidof hd-idle)");
|
system("kill $(pidof hd-idle)");
|
||||||
int sleep_seconds = g_settings.hdd_sleep;
|
int sleep_seconds = g_settings.hdd_sleep;
|
||||||
switch (sleep_seconds) {
|
switch (sleep_seconds) {
|
||||||
|
Reference in New Issue
Block a user