diff options
author | Yehuda Katz <yehuda@ymkatz.net> | 2012-02-22 23:17:05 -0500 |
---|---|---|
committer | Yehuda Katz <yehuda@ymkatz.net> | 2012-02-22 23:17:05 -0500 |
commit | 5e4d70a08270f842daff7c6167d9bad56fff593f (patch) | |
tree | af43729ad348325d2badd1dede3539eeaad88ad4 /etc | |
parent | 1b9c5e4d0086b0285df3f4c5f51aa062fb584530 (diff) | |
download | pfsense-5e4d70a08270f842daff7c6167d9bad56fff593f.zip pfsense-5e4d70a08270f842daff7c6167d9bad56fff593f.tar.gz |
Option to disable startup/shutdown sounds
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 23 | ||||
-rwxr-xr-x | etc/rc.bootup | 3 |
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(); |