From owner-freebsd-arch Tue Jun 19 23:18:29 2001 Delivered-To: freebsd-arch@freebsd.org Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.121.12]) by hub.freebsd.org (Postfix) with ESMTP id 14D8837B403; Tue, 19 Jun 2001 23:18:26 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.247.138.115.Dial1.SanJose1.Level3.net [209.247.138.115]) by harrier.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id XAA20892; Tue, 19 Jun 2001 23:18:19 -0700 (PDT) Message-ID: <3B304000.800BBCF5@mindspring.com> Date: Tue, 19 Jun 2001 23:17:36 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Nik Clayton Cc: arch@FreeBSD.ORG Subject: Re: [PATCH] Show login(1) how to execute programs at start up References: <20010619195223.E68877@clan.nothing-going-on.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Nik Clayton wrote: > Attached is a small diff to login.c to do this. > > With this patch, the "welcome" capability is now a comma-delimited > string of files or programs (and command line arguments). Files are > referenced as before, programs have a leading "|" symbol. To add > fortunes at startup for everybody you'd put > > ... > welcome=/etc/motd,|/usr/games/fortune freebsd-tips:\ > ... What happens if the program won't run; can you still login? The login.conf is important for rebadging FreeBSD based embedded systems; it seems that putting the code in /usr/share/skel is really the best bet. Maybe I'm not understanding the sysinstall/adduser problem? Why is there any teaching necessary? Last time I checked, the root login skeleton ran fortunes, if it was installed, by doing a test for the binary. This seems more reasonable. Alternately, could you limit it to _only_ MOTD, or _only_ running a program, and going back to the prior behavior in case of the program to run not being present? That would just ass a "|xxx" option as an addition, which would have the least impact. You could also put it in the file spewing code, which means that it would work for any option where a file was to be spewed, with the behaviour being as-if-not-specified, as in the missing file case, historically. For an example, the /etc/COPYRIGHT file replaces the login Copyright in the unmodified login.c today. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message