summaryrefslogtreecommitdiff
path: root/src/conf_mode/beep_if_fully_booted.py
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2019-12-31 00:04:10 +0200
committerzsdc <taras@vyos.io>2019-12-31 00:04:10 +0200
commit7fcbd30b3357a047c57db39d0b07ed797f1392df (patch)
tree9f12afa73557425be1e65cbb3a18d0efaa2fc5f7 /src/conf_mode/beep_if_fully_booted.py
parentf7eda283b6eefbbc349384c22a1e15a1d24ae384 (diff)
parentc7b0585fa97779fc070f4a4a0fe825eb0729023c (diff)
downloadvyos-1x-7fcbd30b3357a047c57db39d0b07ed797f1392df.tar.gz
vyos-1x-7fcbd30b3357a047c57db39d0b07ed797f1392df.zip
Merge remote-tracking branch 'upstream/current' into T1514
Diffstat (limited to 'src/conf_mode/beep_if_fully_booted.py')
-rwxr-xr-xsrc/conf_mode/beep_if_fully_booted.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/conf_mode/beep_if_fully_booted.py b/src/conf_mode/beep_if_fully_booted.py
deleted file mode 100755
index f00fcabd0..000000000
--- a/src/conf_mode/beep_if_fully_booted.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (C) 2018 VyOS maintainers and contributors
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 or later as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#
-
-import sys
-import os
-
-from vyos.config import Config
-from vyos import ConfigError
-
-def get_config():
- conf = Config()
- if not conf.exists('system options beep-if-fully-booted'):
- return None
-
- return True
-
-def apply(status):
- if status is not None:
- os.system('/usr/bin/beep -f 130 -l 100 -n -f 262 -l 100 -n -f 330 -l 100 -n -f 392 -l 100 -n -f 523 -l 100 -n -f 660 -l 100 -n -f 784 -l 300 -n -f 660 -l 300')
-
-if __name__ == '__main__':
- try:
- c = get_config()
- apply(c)
- except ConfigError as e:
- print(e)
- sys.exit(1)