diff options
author | Chris Buechler <cmb@pfsense.org> | 2012-02-22 21:37:59 -0800 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2012-02-22 21:37:59 -0800 |
commit | a2263f0cd8b655922ea8a66b3b93a6062539ea99 (patch) | |
tree | af43729ad348325d2badd1dede3539eeaad88ad4 /usr | |
parent | 1b9c5e4d0086b0285df3f4c5f51aa062fb584530 (diff) | |
parent | 5e4d70a08270f842daff7c6167d9bad56fff593f (diff) | |
download | pfsense-a2263f0cd8b655922ea8a66b3b93a6062539ea99.zip pfsense-a2263f0cd8b655922ea8a66b3b93a6062539ea99.tar.gz |
Merge pull request #56 from yakatz/beep
Option to disable startup/shutdown sounds
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/bin/beep.sh | 4 | ||||
-rw-r--r-- | usr/local/www/system_advanced_admin.php | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/usr/local/bin/beep.sh b/usr/local/bin/beep.sh index 6f4e477..eeefc55 100755 --- a/usr/local/bin/beep.sh +++ b/usr/local/bin/beep.sh @@ -1,5 +1,9 @@ #!/bin/sh +if [ -f /etc/disable_beep ]; then + exit; +fi + # Standard note length NOTELENGTH="25" diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php index a843c7c..88f022a 100644 --- a/usr/local/www/system_advanced_admin.php +++ b/usr/local/www/system_advanced_admin.php @@ -55,6 +55,7 @@ $pconfig['max_procs'] = ($config['system']['webgui']['max_procs']) ? $config['sy $pconfig['ssl-certref'] = $config['system']['webgui']['ssl-certref']; $pconfig['disablehttpredirect'] = isset($config['system']['webgui']['disablehttpredirect']); $pconfig['disableconsolemenu'] = isset($config['system']['disableconsolemenu']); +$pconfig['disablebeep'] = isset($config['system']['disablebeep']); $pconfig['noantilockout'] = isset($config['system']['webgui']['noantilockout']); $pconfig['nodnsrebindcheck'] = isset($config['system']['webgui']['nodnsrebindcheck']); $pconfig['nohttpreferercheck'] = isset($config['system']['webgui']['nohttpreferercheck']); @@ -141,6 +142,14 @@ if ($_POST) { auto_login(); } + if($_POST['disablebeep'] == "yes") { + $config['system']['disablebeep'] = true; + setup_beep(); + } else { + unset($config['system']['disablebeep']); + setup_beep(); + } + if ($_POST['noantilockout'] == "yes") $config['system']['webgui']['noantilockout'] = true; else @@ -395,6 +404,15 @@ function prot_change() { </td> </tr> <tr> + <td width="22%" valign="top" class="vncell"><?=gettext("Startup/Showtdown Sound"); ?></td> + <td width="78%" class="vtable"> + <input name="disablebeep" type="checkbox" id="disablebeep" value="yes" <?php if ($pconfig['disablebeep']) echo "checked"; ?> /> + <strong><?=gettext("Disable the startup/shutdown beep"); ?></strong> + <br/> + <span class="vexpl"><?=gettext("When this is checked, startup and shutdown sounds will no longer play."); ?></span> + </td> + </tr> + <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Anti-lockout"); ?></td> <td width="78%" class="vtable"> <?php |