Page MenuHomeVyOS Platform

Beep When Fully Booted
Closed, ResolvedPublic


Let's add this to next release!

Beep When Fully Booted

sudo dpkg -i beep_1.2.2-24_i386.deb
rm beep_1.2.2-24_i386.deb
echo "beep -l 200 -f 750 -n -l 200 -f 1000" | sudo tee -a /etc/init.d/rc.local


Difficulty level
Easy (less than an hour)

Event Timeline

hexes created this task.Dec 5 2016, 7:22 AM

set system options beep-on-startup

syncer triaged this task as Low priority.
syncer added a subscriber: syncer.

@dmbaturin should be no harm from including into 1.1.8 right?

I'll start with 1.2 and backport from there if necessary.

syncer added a subscriber: VyOS 1.2 Crux.
higebu added a subscriber: higebu.Aug 20 2017, 3:21 PM

@syncer I think we can remove this task from 1.1.8 backlog, because this is new feature.

Agree, @EwaldvanGeffen can you move it to 1.2.x please

syncer changed the edit policy from "Public (No Login Required)" to "Custom Policy".Aug 21 2017, 12:34 AM
syncer removed a project: VyOS 1.1.x (1.1.8).
syncer set Version to -.
syncer moved this task from Need Triage to Backlog on the VyOS 1.2 Crux board.
syncer removed subscribers: VyOS 1.2 Crux, VyOS 1.1.x.
c-po added a subscriber: c-po.May 22 2018, 4:55 PM

any updates on this?

In T201#14503, @c-po wrote:

any updates on this?

unfortunately no. Please reassign.

syncer removed EwaldvanGeffen as the assignee of this task.May 22 2018, 8:16 PM
c-po mentioned this in Unknown Object (Ponder Answer).May 26 2018, 2:04 PM

I'll take it on.

syncer assigned this task to hagbard.May 26 2018, 9:10 PM


hagbard changed the task status from Open to In progress.Jun 6 2018, 4:09 PM

Interface definition is the last piece which needs to be done, should happen this week.

hagbard moved this task from Backlog to In Progress on the VyOS 1.2 Crux board.Jun 6 2018, 4:22 PM

Sorry I got stuck a little.
I have the interface definition written, using the new recommended style. However, create/delete and the such need to be handled in a script.

interface definition:

That creates the following content:

type: txt
help: plays sound via system speaker when you can login
val_help: enable; plays a sound via system speaker when logins are possible
val_help: disable; disable playing a sound when logins are possible
syntax:expression: exec "${vyos_libexec_dir}/ --regex \'(enable|disable)\' --value \'$VAR(@)\'"; "Invalid value"
end: sudo sh -c "/bin/systemctl -q $VAR(@) beep"

But I would either need create/update/delete (systemctl enable|disable is then being called), or a way to detect it via script what was called.
I can easily call a script instead of systemctl direclty, but how do I know the user called a create 'set system options beep-if-fully-booted enable' etc.?

I tried to find it our from existing scripts and via printing the environment our, but I just didn't figure it out how to properly detect that.
Can you point me into the right deirection please?



c-po added a comment.Jun 13 2018, 4:53 PM

Create/update/delete are all called implicit by the execution of the given Python script.

Lets take "service dns forwarding" as example, the python script is here and it is invoked from here.

So when the Python scripts are executed we analyse the current configuration in get_config() then check if it is correct in verify() and generate the new configuration files in generate(). After the configuration is generated we simply activate it in apply() usually be starting the service, or stopping it if there is no configuration at all (deleted). The configuration is always generated completely and there is no "update" anymore.

Maybe this is a help, too

Hope this helps

Thanks Christian, that helps a lot. I was assuming I only need to generate configs if I really write config data int oa local file, so I have something to compare.
Thanks again, still need to play with it a little, but I think I understand now the parts of it.

hagbard moved this task from In Progress to Finished on the VyOS 1.2 Crux board.Jun 18 2018, 5:48 PM
hagbard closed this task as Resolved.Jun 19 2018, 10:02 PM