summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorYehuda Katz <yehuda@ymkatz.net>2012-02-22 23:17:05 -0500
committerYehuda Katz <yehuda@ymkatz.net>2012-02-22 23:17:05 -0500
commit5e4d70a08270f842daff7c6167d9bad56fff593f (patch)
treeaf43729ad348325d2badd1dede3539eeaad88ad4 /etc
parent1b9c5e4d0086b0285df3f4c5f51aa062fb584530 (diff)
downloadpfsense-5e4d70a08270f842daff7c6167d9bad56fff593f.zip
pfsense-5e4d70a08270f842daff7c6167d9bad56fff593f.tar.gz
Option to disable startup/shutdown sounds
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc23
-rwxr-xr-xetc/rc.bootup3
2 files changed, 26 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index b0a93a2..da39c39 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -927,6 +927,29 @@ function auto_login() {
conf_mount_ro();
}
+function setup_beep() {
+ global $config;
+
+ if(isset($config['system']['disablebeep']))
+ $status = false;
+ else
+ $status = true;
+
+ $beep_file = "/etc/disable_beep";
+
+ conf_mount_rw();
+
+ if($status == false) {
+ touch($beep_file);
+ } else {
+ if (file_exists($beep_file)) {
+ unlink($beep_file);
+ }
+ }
+
+ conf_mount_ro();
+}
+
function setup_serial_port($when="save", $path="") {
global $g, $config;
conf_mount_rw();
diff --git a/etc/rc.bootup b/etc/rc.bootup
index e224519..574bd51 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -360,6 +360,9 @@ system_set_harddisk_standby();
/* lock down console if necessary */
auto_login();
+/* disable beep.sh if configured */
+setup_beep();
+
/* load graphing functions */
enable_rrd_graphing();
OpenPOWER on IntegriCloud