Date: Fri, 25 Jun 1999 11:09:35 -0400 From: Christopher Michaels <ChrisMic@clientlogic.com> To: 'Lowell Gilbert' <lowell@world.std.com> Cc: "FreeBSD Questions (E-mail)" <questions@FreeBSD.org> Subject: RE: Cycling bootup splash screens? (trivial) Message-ID: <6C37EE640B78D2118D2F00A0C90FCB44011059EA@site2s1>
next in thread | raw e-mail | index | archive | help
Thanks for the info. In all honesty, it's a novelty, since it's new to me and I have here a machine that will be rebooted frequently. The "novelty" will probably wear off by next week. MY freebsd machine, which is my network server, has no monitor attached and it only rebooted when I put in a new kernel. That, and the thought just made me curious of how I would go about making it cycle (or randomize). I could then apply that knowledge to other things. Thanks again, Chris > -----Original Message----- > From: Lowell Gilbert [SMTP:lowell@world.std.com] > Sent: Thursday, June 24, 1999 5:26 PM > To: ChrisMic@clientlogic.com > Cc: questions@FreeBSD.org > Subject: Re: Cycling bootup splash screens? (trivial) > > From: Christopher Michaels <ChrisMic@clientlogic.com> > Date: Thu, 24 Jun 1999 16:49:29 -0400 > > I was thinking the latter, of using a symlink to an image and just > leaving > /boot/loader.conf alone. > > That seems easiest (and best) to me. > > Unfortunately, i'm not versed enough to get started on that script. > I'll > probably beat my head over it this weekend. :^) > > It'll be good practice. > > You wouldn't happen to have any ideas on how I would go about randomly > selecting a file in a directory would you? > > Well, that is the hard part, isn't it? Once you've got a filename in > a (shell script) variable, making a symbolic link to it in a specific > place is easy. > > In my shell, bash, you have a variable that gives you random values, > indexable arrays, and arithmetic calculations. That is enough to > randomly pick one of a set. You can get the set from 'ls', and you > can get the number of items in the set from applying 'wc' to 'ls'. > > As a C programmer, I only thought about the shell stuff for a few > seconds before realizing that a program to randomly pick one of its > parameters (and spit it back) is essentially a two-liner: > #include <stdlib.h> > int main(int argc, char *argv[]) > { > srandomdev(); > printf("%s",argv[random()%argc]); > } > which could make the shell script even easier. > > Actually, I assumed that you'd want to cycle through the screens > rather than picking one randomly. But then, I don't "get" the > attraction of splash screens, myself. > > Good luck. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6C37EE640B78D2118D2F00A0C90FCB44011059EA>