Date: Tue, 14 Dec 2010 19:02:54 +0100 From: =?ISO-8859-1?Q?Samuel_Mart=EDn_Moro?= <faust64@gmail.com> To: freebsd-questions@freebsd.org Subject: boot, rc script and logs Message-ID: <AANLkTinvyWbKo%2BQB9zEm1brTc-OnUCrJCYHK00ESEAWY@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, I'm adding some scripts to FreeBSD boot. One of this script runs a binary that checks our postgres database, its output being redirected to a dialog --gauge. But I noticed that the dialog output, while correctly displayed on the terminal, is also dumped into /var/log/console.log and /var/log/messages. I'm not even sure about how this is happening... I can't find about message= s nor console.log in /etc/rc* Is there a way to disable log output in a given rc.script? here's my script: #!/bin/sh [...] test "$1" =3D 'start' -o "$1" =3D 'faststart' || exit 0 Prg=3D`basename $_file` exec 2>/var/log/$Prg.log test "$TERM" || export TERM=3Dcons25 DIALOG=3D"/usr/local/bin/dialog --no-collapse --cr-wrap --colors" echo "tty is `tty`" >&2 #debug, prints: tty is /dev/console echo "=3D=3D=3D=3D=3D Checking DB 1/2 =3D=3D=3D=3D=3D" >&2 dbcheck -s | $DIALOG --gauge "\n Checking DB 1/2" 7 70 2>/dev/null echo "=3D=3D=3D=3D=3D Checking DB 2/2 =3D=3D=3D=3D=3D" >&2 dbcheck -r -s | $DIALOG --gauge "\n Checking DB 2/2" 7 70 2>/dev/null [...] here is what it gives in /var/log/messages: Dec 14 13:26:46 camtrace13 dhclient: New Subnet Mask (wlan0): 255.255.255.0 Dec 14 13:26:46 camtrace13 dhclient: New Broadcast Address (wlan0): 192.168.0.255 Dec 14 13:26:46 camtrace13 dhclient: New Routers (wlan0): 192.33.160.111 Dec 14 13:26:47 camtrace13 kernel: m ^[[36m^[[44m^[[K^[[16;6H^[[1K ^[[30m^[[40m^[[70X^[[77`^[[36m^[[44m^[[K^[[13;9H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: m ^[[36m^[[44m^[[K^[[16;6H^[[1K ^[[30m^[[40m^[[70X^[[77`^[[36m^[[44m^[[K^[[13;9H^[[39;49m^[[m Dec 14 13:27:10 camtrace13 kernel: oss_hdaudio0: [ITHREAD] Dec 14 13:27:10 camtrace13 kernel: oss_hdaudio: HDA codec 0x10de0007 not known yet Dec 14 13:27:10 camtrace13 kernel: oss_hdaudio: HDA codec 0x10de0007 not known yet and here is what I can read in /var/log/console.log: Dec 14 13:26:43 camtrace13 kernel: Starting apache. Dec 14 13:26:46 camtrace13 kernel: Starting pgsql. Dec 14 13:26:47 camtrace13 kernel: ^[[m Dec 14 13:26:47 camtrace13 kernel: ^[[39;49m^[[=3D1S Dec 14 13:26:47 camtrace13 kernel: ^[[39;49m^[[m^[[H^[[J^[[17d^[[36m^[[44m^[[1m^[[J^[[H^[[K^[[B^[[K^[[B^[[K^[[= B^[[K^[[B^[[K^[[B^[[K^[[B^[[K^[[B^[[K^[[B ^[[37m^[[47m=DA=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4= =C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4= =C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4^[[m^[= [30m^[[47m=BF^[[m^[[36m^[[44m^[[1m^[[K^[[B ^[[37m^[[47m=B3^[[m^[[30m^[[47m^[[68X^[[74`=B3^[[m^[[30m^[[40m^[[1m ^[[36m^[[44m^[[K^[[B ^[[37m^[[47m=B3^[[m^[[30m^[[47m Checking DB 1/2^[[20X^[[74`=B3^[[m^[[30m^[[40m^[[1m ^[[36m^[[44m^[[K^[[B ^[[37m^[[47m=B3^[[m^[[30m^[[47m ^[[37m^[[47m^[[1m=DA=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4= =C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C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[[34m^[[47m^[[1m11^[[13;15H^[[39;49m^[[m Dec 14 13:26:47 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m ^[[13;40H^[[m^[[34m^[[47m^[[1m2^[[13;16H^[[39;49m^[[m Dec 14 13:26:47 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m ^[[13;40H^[[m^[[34m^[[47m^[[1m3^[[13;17H^[[39;49m^[[m Dec 14 13:26:47 camtrace13 kernel: ^[[13;40H^[[34m^[[47m^[[1m4^[[13;17H^[[39;49m^[[m Dec 14 13:26:47 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m 81% ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;39H^[[34m^[[47m^[[1m^[[7m96^[[13;59H ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;40H^[[34m^[[47m^[[1m^[[7m7^[[13;68= H ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;40H^[[34m^[[47m^[[1m^[[7m8^[[13;69H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;38H^[[34m^[[47m^[[1m^[[7m100^[[13;69H ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[=3DS Dec 14 13:26:48 camtrace13 kernel: ^[[16;77H Dec 14 13:26:48 camtrace13 kernel: ^[[25;1H Dec 14 13:26:48 camtrace13 kernel: ^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[39;49m^[[=3D1S Dec 14 13:26:48 camtrace13 kernel: ^[[39;49m^[[m^[[H^[[J^[[17d^[[36m^[[44m^[[1m^[[J^[[H^[[K^[[B^[[K^[[B^[[K^[[= B^[[K^[[B^[[K^[[B^[[K^[[B^[[K^[[B^[[K^[[B ^[[37m^[[47m=DA=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4= =C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=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=C4=C4=C4=D9= ^[[m^[[30m^[[47m =B3^[[m^[[30m^[[40m^[[1m ^[[36m^[[44m^[[K^[[B ^[[37m^[[47m=C0^[[m^[[30m^[[47m=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4= =C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4= =C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4= =C4=C4=C4=C4=D9^[[m^[[30m^[[40m^[ Dec 14 13:26:48 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m ^[[13;40H^[[m^[[34m^[[47m^[[1m3^[[13;10H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m ^[[13;39H^[[m^[[34m^[[47m^[[1m11^[[13;15H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m ^[[13;40H^[[m^[[34m^[[47m^[[1m2^[[13;16H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m ^[[13;40H^[[m^[[34m^[[47m^[[1m3^[[13;17H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;40H^[[34m^[[47m^[[1m4^[[13;17H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[34m^[[47m^[[1m^[[7m 81% ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;39H^[[34m^[[47m^[[1m^[[7m96^[[13;59H ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;40H^[[34m^[[47m^[[1m^[[7m7^[[13;68= H ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;40H^[[34m^[[47m^[[1m^[[7m8^[[13;69H^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[13;38H^[[34m^[[47m^[[1m^[[7m100^[[13;69H ^[[39;49m^[[m Dec 14 13:26:48 camtrace13 kernel: ^[[=3DS Dec 14 13:26:48 camtrace13 kernel: ^[[16;77H Dec 14 13:26:48 camtrace13 kernel: ^[[25;1H Dec 14 13:26:48 camtrace13 kernel: Starting slim. Dec 14 13:26:48 camtrace13 kernel: Starting dhclient and oss seem to dump their output in /var/log/messages, while apache, postgresql and slim dump their one in /var/log/console.log So... How can my rc.script write in both console and messages logs? And how can I get rid of that? Thanks for your help! --=20 Samuel Mart=EDn Moro {EPITECH.} tek5 CamTrace S.A.S (+033) 1 41 38 37 60 1 All=E9e de la Venelle 92150 Suresnes FRANCE "Nobody wants to say how this works. Maybe nobody knows ..." Xorg.conf(5)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinvyWbKo%2BQB9zEm1brTc-OnUCrJCYHK00ESEAWY>