Date: Tue, 19 Jun 2001 23:17:36 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Nik Clayton <nik@FreeBSD.ORG> Cc: arch@FreeBSD.ORG Subject: Re: [PATCH] Show login(1) how to execute programs at start up Message-ID: <3B304000.800BBCF5@mindspring.com> References: <20010619195223.E68877@clan.nothing-going-on.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B304000.800BBCF5>