Truenas Core - beep when correctly loaded

dzikk

Cadet
Joined
Nov 1, 2022
Messages
9
Hi
I have to switch my TrueNas server during night but after that sometimes my mobo has problem with boot up.
So in this case I would like to ask : how or if its even possible to make control beeps when Truenas is ready?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Add a post-boot task to do whatever it is you would like it to do (beep, flash disco lights, etc).
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Or play a weird-ass jingle, because FreeBSD firewall distros are into that.

In any case, beep(1) is your friend.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
The relevant section of the docs would be:


I'm not sure if the default "beep" program exists in both TrueNAS CORE and SCALE, but printf "\007" as a bash command line or script should work if it doesn't.
 

dzikk

Cadet
Joined
Nov 1, 2022
Messages
9
Thanks for reply
I wanted to call it 3 times, and few weeks ago I managed it but I had to reinstall Truenas and now I cannot call it.
This one does not work. What is wrong with it. Previously looked similar but I dont remember what command I used for wait

printf "\007" > /dev/ttyv0 wait 1 printf "\007" > /dev/ttyv0 wait 1 printf "\007" > /dev/ttyv0
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
To pause for a second in a shell command, use sleep 1.
 

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211
note you have to
printf "\007" > /dev/ttyv0 wait 1 printf "\007" > /dev/ttyv0 wait 1 printf "\007" > /dev/ttyv0
At least put ";" between commands.

did not verify, seems to need root rights
Code:
printf "\007" > /dev/ttyv0;  sleep 1; printf "\007" > /dev/ttyv0; sleep 1; printf "\007" > /dev/ttyv0
 
Top