Date: Sat, 9 Jan 1999 00:38:31 +1100 (EST) From: Andy Farkas <andyf@speednet.com.au> To: freebsd-current@FreeBSD.ORG Subject: Re: beep, beep, beep! Message-ID: <Pine.BSF.4.05.9901090036270.6909-100000@backup.zippynet.iol.net.au> In-Reply-To: <Pine.BSF.4.05.9901081440120.6646-100000@backup.zippynet.iol.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 8 Jan 1999, Andy Farkas wrote: > Shouldn't the new boot code be beeping at us? :) > Seeing as how I mentioned it, here is my effort: patch to /usr/src/sys/boot/common/boot.c: --- common/boot.c 1999/01/08 08:23:01 1.1 +++ common/boot.c 1999/01/08 13:13:34 @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: boot.c,v 1.1 1999/01/08 08:23:01 root Exp $ + * $Id: boot.c,v 1.5 1999/01/08 13:12:59 root Exp root $ */ /* @@ -155,11 +155,22 @@ void autoboot_maybe() { - char *cp; + unsigned int beeps = 3; + char *cp, *ep; cp = getenv("autoboot_delay"); - if ((autoboot_tried == 0) && ((cp == NULL) || strcasecmp(cp, "NO"))) + if ((autoboot_tried == 0) && ((cp == NULL) || strcasecmp(cp, "NO"))) { + if ((cp = getenv("autoboot_beeps"))) { + beeps = strtol(cp, &ep, 0); + if ((cp == ep) || (beeps > 3)) + beeps = 3; + } + + while (beeps--) + printf("\a"); + autoboot(-1, NULL); /* try to boot automatically */ + } } int [end patch] -- :{ andyf@speednet.com.au Andy Farkas System Administrator Speed Internet Services http://www.speednet.com.au/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901090036270.6909-100000>