From e955045cc8f69f6e7b842217581a331ca1252cdb Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 7 Dec 2015 19:22:16 +0100 Subject: [PATCH] (legacy) remove unused system_set_harddisk_standby --- src/etc/inc/system.inc | 28 ---------------------------- src/etc/rc.bootup | 3 --- 2 files changed, 31 deletions(-) diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index cbc4a8f19..04581fafd 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1718,34 +1718,6 @@ function system_console_configure() setup_serial_port(); } -function system_set_harddisk_standby() -{ - global $config; - - if (isset($config['system']['harddiskstandby'])) { - if (file_exists("/var/run/booting")) { - echo gettext('Setting hard disk standby... '); - } - - $standby = $config['system']['harddiskstandby']; - // Check for a numeric value - if (is_numeric($standby)) { - mwexec('/bin/sync'); - if (set_single_sysctl('hw.ata.standby', (int)$standby)) { - // Reinitialize ATA-drives - mwexec('/usr/local/sbin/atareinit'); - if (file_exists("/var/run/booting")) { - echo gettext("done.") . "\n"; - } - } else if (file_exists("/var/run/booting")) { - echo gettext("failed!") . "\n"; - } - } else if (file_exists("/var/run/booting")) { - echo gettext("failed!") . "\n"; - } - } -} - function system_setup_sysctl() { global $config; diff --git a/src/etc/rc.bootup b/src/etc/rc.bootup index 4b75bd602..ca9b04f75 100755 --- a/src/etc/rc.bootup +++ b/src/etc/rc.bootup @@ -310,9 +310,6 @@ $ipsec_dynamic_hosts = vpn_ipsec_configure(); /* start SNMP service */ services_snmpd_configure(); -/* power down hard drive if needed/set */ -system_set_harddisk_standby(); - /* lock down console if necessary */ reload_ttys();