From owner-freebsd-questions@FreeBSD.ORG Thu Feb 23 21:44:35 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 526FA106566C for ; Thu, 23 Feb 2012 21:44:35 +0000 (UTC) (envelope-from dan@buildingonline.com) Received: from mail.buildingonline.net (mail.buildingonline.net [12.130.64.9]) by mx1.freebsd.org (Postfix) with ESMTP id 19D788FC08 for ; Thu, 23 Feb 2012 21:44:34 +0000 (UTC) Received: from [192.168.1.208] ([206.127.77.66]) by mail.buildingonline.net (8.13.7/8.13.7) with ESMTP id q1NLWcLP043410; Thu, 23 Feb 2012 13:32:38 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Dan Busarow In-Reply-To: Date: Thu, 23 Feb 2012 14:32:38 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Robarrght X-Mailer: Apple Mail (2.1084) Cc: freebsd-questions@freebsd.org Subject: Re: (c)dialog working differently during boot in script called by rc system than after boot? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 21:44:35 -0000 On Feb 23, 2012, at 11:21 AM, Robarrght wrote: > (Background) > I have a script that uses dialog or cdialog (system, not devel,) to > prompt for network settings on my FreeBSD 8.2-RELEASE box. When I > make certain changes with the script, a reboot is required. But, this > would not be necessary if I ran the script during boot, before > networking is setup. I've hooked up my script to the rc boot system. >=20 > (Issue) > The trouble is that when the rc.d system runs the script, instead of > the proper dialog boxes working as expected, all I get is a cleared > out black screen with a white arrow locked dead center that won't > move. After boot, the script works normally. I even have the script > running in getty on a virtual console, where it works like a champ. Looks like your TERM variable is not set when booting. Not a big = surprise really. Try setting TERM=3Dcons25 in your script before it calls dialog Dan >=20 > So, what is the hangup? Are there dependencies that (c)dialog needs > which aren't started yet? >=20 > (Troubleshooting) > If I simply run > dialog --msgbox "Test message" 6 25 > in the rc.d file, instead of having it call my script, I get the same > bad behavior. That suggests that it is not my script, but the > environment ... right? > I have played with the order of when the test dialog message (my rc.d > file) is ordered and even when it goes way at the end, after cron > starts up, (which is getting pretty close to the end,) no improvement. >=20 > I've seen this work on an older FreeBSD 6.2-STABLE box. But, when I > cranked one of those up and tried the same simple dialog test directly > out of the rc.d script, it yielded a black and white ascii only > version of the message box. That was an improvement over what I'm > getting on my current FreeBSD 8.2-RELEASE version. But, I wish I knew > what the former magic was. >=20 > Does anyone out there see what I'm missing? >=20 > Thank you, > Robarrght > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org"