-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2005-10-09 at 09:08 +0200, pelibali wrote:
Recently I setup a SUSE 9.3 for router/firewall/proxy purposes, which starts up in runlevel 3. It has no peripheries or monitor at all, but I would like to be "notified", when the system is up and running. So, is there an easy way please to make the router beep e.g. through the speaker of the system, when we can in fact use its resources already?!
The script '/etc/init.d/after.local' is called by '/etc/init.d/rc' just after runlevel change, and can be used for the purpose. For example, mine has this code: #! /bin/bash cat /usr/share/sounds/au/hal9.au > /dev/audio & That only works if sound is available, but I find it "cute". To use a beep with the internal speaker, you could do: echo -en "\a" A more complicated "beep" tone could be: # octave for tone in 524 491 440 393 349 328 295 ; do echo -en "\033[10;${tone}]\a" usleep 125000 done echo -en "\033[10;262]" which you can see in '/etc/init.d/halt', and a few more. Knowing the trick, and the musical notes frequencies, you could play anything. A problem with beeping in Linux is that you need to have console output to beep anything at all. Thus, a script run from cron can not beep. A pity. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDSQuwtTMYHG2NR9URAvztAJoD9mGFQm4RQMFwoaDEMTUO/4IeMACcCpwb nn1V4FgnKIPeS0FOfyWDdeI= =4Yd+ -----END PGP SIGNATURE-----