Re: cvs commit: src/etc/rc.d hostid

2007-05-23 Thread Warner Losh
From: Doug Barton <[EMAIL PROTECTED]> Subject: Re: cvs commit: src/etc/rc.d hostid Date: Wed, 23 May 2007 09:52:28 -0700 (PDT) > On Tue, 22 May 2007, Brooks Davis wrote: > > > I think /etc or /boot is the right place and IIRC pjd had a reason why > > /etc was right. The

Re: cvs commit: src/etc/rc.d hostid

2007-05-23 Thread Doug Barton
On Tue, 22 May 2007, Brooks Davis wrote: I think /etc or /boot is the right place and IIRC pjd had a reason why /etc was right. The problem with /var/db is that's it's not available until fairly late in the boot and hostid is needed for non-root disks. It's worth remembering that in the normal

Re: cvs commit: src/etc/rc.d hostid

2007-05-22 Thread Brooks Davis
On Tue, May 22, 2007 at 10:07:03AM -0700, Doug Barton wrote: > Brooks Davis wrote: > > > I'm not sure that's a bug. Perhaps if it's too noisy. There are > > several other places that require a writable etc or require certain > > files to be linked to somewhere writable. Adding a note to the >

Re: cvs commit: src/etc/rc.d hostid

2007-05-22 Thread Doug Barton
Brooks Davis wrote: I'm not sure that's a bug. Perhaps if it's too noisy. There are several other places that require a writable etc or require certain files to be linked to somewhere writable. Adding a note to the diskless(8) manpage might be useful. I had a concern about this too, but did

Re: cvs commit: src/etc/rc.d hostid

2007-05-22 Thread Brooks Davis
On Tue, May 22, 2007 at 07:56:42AM -0500, Eric Anderson wrote: > On 05/21/07 14:57, Dag-Erling Sm?rgrav wrote: > > Jung-uk Kim <[EMAIL PROTECTED]> writes: > >> 'smbios.system.uuid' is exported from loader, not from kernel. And it > >> already checks two things, i.e., all zero's and all 0xff's, wh

Re: cvs commit: src/etc/rc.d hostid

2007-05-22 Thread Pawel Jakub Dawidek
On Tue, May 22, 2007 at 07:56:42AM -0500, Eric Anderson wrote: > On 05/21/07 14:57, Dag-Erling Sm?rgrav wrote: > >Jung-uk Kim <[EMAIL PROTECTED]> writes: > >>'smbios.system.uuid' is exported from loader, not from kernel. And it > >>already checks two things, i.e., all zero's and all 0xff's, which

Re: cvs commit: src/etc/rc.d hostid

2007-05-22 Thread Ralf S. Engelschall
On Tue, May 22, 2007, Pawel Jakub Dawidek wrote: > On Tue, May 22, 2007 at 10:22:24AM +, Ralf S. Engelschall wrote: > > rse 2007-05-22 10:22:24 UTC > > > > FreeBSD src repository > > > > Modified files: > > etc/rc.d hostid > > Log: > > Remove the ugly csh(1) bas

Re: cvs commit: src/etc/rc.d hostid

2007-05-22 Thread Eric Anderson
On 05/21/07 14:57, Dag-Erling Smørgrav wrote: Jung-uk Kim <[EMAIL PROTECTED]> writes: 'smbios.system.uuid' is exported from loader, not from kernel. And it already checks two things, i.e., all zero's and all 0xff's, which are the most common and 'useless' UUIDs. If the SMBIOS has one of these,

Re: cvs commit: src/etc/rc.d hostid

2007-05-22 Thread Pawel Jakub Dawidek
On Tue, May 22, 2007 at 10:22:24AM +, Ralf S. Engelschall wrote: > rse 2007-05-22 10:22:24 UTC > > FreeBSD src repository > > Modified files: > etc/rc.d hostid > Log: > Remove the ugly csh(1) based UUID lower-case translation hack from > /etc/rc.d/hostid now

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Jung-uk Kim
On Monday 21 May 2007 03:57 pm, Dag-Erling Smørgrav wrote: > Jung-uk Kim <[EMAIL PROTECTED]> writes: > > 'smbios.system.uuid' is exported from loader, not from kernel. > > And it already checks two things, i.e., all zero's and all > > 0xff's, which are the most common and 'useless' UUIDs. If the

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Dag-Erling Smørgrav
Jung-uk Kim <[EMAIL PROTECTED]> writes: > 'smbios.system.uuid' is exported from loader, not from kernel. And it > already checks two things, i.e., all zero's and all 0xff's, which are > the most common and 'useless' UUIDs. If the SMBIOS has one of these, > it is not set at all. Is it safe to ass

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Jung-uk Kim
On Monday 21 May 2007 03:09 pm, Dag-Erling Smørgrav wrote: > Jung-uk Kim <[EMAIL PROTECTED]> writes: > > Why don't we change smbios.system.uuid to all lower cases? ;-) > > I have no problem with that. > > For that matter, we could even verify that the UUID is valid within > the kernel before return

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Doug Barton
Pawel Jakub Dawidek wrote: The main purpose of this script is to use UUID given via SMBIOS when it's valid and you just removed the code responsible for correctness checking. I already addressed that in my response to des. I also don't really see the win of using csh(1) only sometimes Fort

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Dag-Erling Smørgrav
Jung-uk Kim <[EMAIL PROTECTED]> writes: > Why don't we change smbios.system.uuid to all lower cases? ;-) > I have no problem with that. For that matter, we could even verify that the UUID is valid within the kernel before returning it to userland, eliminating the need for a syntax check in etc/rc.

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Dag-Erling Smørgrav
Doug Barton <[EMAIL PROTECTED]> writes: > Dag-Erling Smørgrav <[EMAIL PROTECTED]> writes: > > Doug Barton <[EMAIL PROTECTED]> writes: > > > Meanwhile, I've attached a patch that simplifies the hostid_hardware() > > > quite a bit, and has the added virtue of only calling csh if it's > > > needed. >

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Steve Kargl
On Mon, May 21, 2007 at 08:50:32PM +0200, Pawel Jakub Dawidek wrote: > > I'm also not happy with using csh(1), but I agree with rse@'s change in > general. Are you aware that signal handling appears to be messed up in (t)csh? Hopefully, this change doesn't render someones system as unbootable. ht

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Doug Barton
Jung-uk Kim wrote: Why don't we change smbios.system.uuid to all lower cases? ;-) I have no problem with that. That would obviously be the better solution, but I was making the (probably faulty) assumption that it wasn't possible for some reason. Doug -- This .signature sanitized for

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Jung-uk Kim
On Monday 21 May 2007 02:10 pm, Doug Barton wrote: > Ralf S. Engelschall wrote: > > rse 2007-05-21 11:44:13 UTC > > > > FreeBSD src repository > > > > Modified files: > > etc/rc.d hostid > > Log: > > Adjust UUID lower-case translation from straight-forward tr(1) > >

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Pawel Jakub Dawidek
On Mon, May 21, 2007 at 11:10:12AM -0700, Doug Barton wrote: > Ralf S. Engelschall wrote: > >rse 2007-05-21 11:44:13 UTC > > FreeBSD src repository > > Modified files: > >etc/rc.d hostid Log: > > Adjust UUID lower-case translation from straight-forward tr(1) > > usage

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Doug Barton
Dag-Erling Smørgrav wrote: Doug Barton <[EMAIL PROTECTED]> writes: Meanwhile, I've attached a patch that simplifies the hostid_hardware() quite a bit, and has the added virtue of only calling csh if it's needed. It also fails to ensure that the UUID has the correct syntax. If we're really co

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Dag-Erling Smørgrav
Doug Barton <[EMAIL PROTECTED]> writes: > Meanwhile, I've attached a patch that simplifies the hostid_hardware() > quite a bit, and has the added virtue of only calling csh if it's > needed. It also fails to ensure that the UUID has the correct syntax. DES -- Dag-Erling Smørgrav - [EMAIL PROTECT

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Doug Barton
Ralf S. Engelschall wrote: rse 2007-05-21 11:44:13 UTC FreeBSD src repository Modified files: etc/rc.d hostid Log: Adjust UUID lower-case translation from straight-forward tr(1) usage to an equivalent csh(1) usage as tr(1) stays in /usr/bin and /etc/rc.d/ho

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Ralf S. Engelschall
On Mon, May 21, 2007, Ralf S. Engelschall wrote: > On Mon, May 21, 2007, Mike Makonnen wrote: > > > On Mon, May 21, 2007 at 08:22:44AM +, Ralf S. Engelschall wrote: > > > rse 2007-05-21 08:22:44 UTC > > > > > > FreeBSD src repository > > > > > > Modified files: > > > etc/rc.d

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Dag-Erling Smørgrav
"Ralf S. Engelschall" <[EMAIL PROTECTED]> writes: > Mike Makonnen <[EMAIL PROTECTED]> writes: > > tr(1) lives in /usr/bin, which may not be available when / (root) is > > mounted (it may live on a remotely mounted filesystem, for example). So, > > you can't rely on tr(1) being available when this s

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Ralf S. Engelschall
On Mon, May 21, 2007, Mike Makonnen wrote: > On Mon, May 21, 2007 at 08:22:44AM +, Ralf S. Engelschall wrote: > > rse 2007-05-21 08:22:44 UTC > > > > FreeBSD src repository > > > > Modified files: > > etc/rc.d hostid > > Log: > > The standardized textual represe

Re: cvs commit: src/etc/rc.d hostid

2007-05-21 Thread Mike Makonnen
On Mon, May 21, 2007 at 08:22:44AM +, Ralf S. Engelschall wrote: > rse 2007-05-21 08:22:44 UTC > > FreeBSD src repository > > Modified files: > etc/rc.d hostid > Log: > The standardized textual representation of UUIDs according to RFC 4122 > and ISO/IEC-9834