Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 May 2015 17:44:48 -0700
From:      Eitan Adler <eadler@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Xin LI <delphij@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r282672 - head/etc/rc.d
Message-ID:  <CAF6rxgnFdtjY%2BSRtoRcyqhQGSbrefknfJhxfjALuGsjXMyRLRw@mail.gmail.com>
In-Reply-To: <C072FED2-FBED-4EF9-9D74-11B485594AD7@FreeBSD.org>
References:  <201505082336.t48NaWRS080408@svn.freebsd.org> <C072FED2-FBED-4EF9-9D74-11B485594AD7@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 May 2015 at 12:45, John Baldwin <jhb@freebsd.org> wrote:
>
>> On May 8, 2015, at 19:36, Xin LI <delphij@FreeBSD.org> wrote:
>>
>> Author: delphij
>> Date: Fri May  8 23:36:31 2015
>> New Revision: 282672
>> URL: https://svnweb.freebsd.org/changeset/base/282672
>>
>> Log:
>>  Always convert uuid to lower case.
>>
>>  MFC after:    2 weeks
>>
>> Modified:
>>  head/etc/rc.d/hostid
>>
>> Modified: head/etc/rc.d/hostid
>> ==============================================================================
>> --- head/etc/rc.d/hostid    Fri May  8 23:29:42 2015    (r282671)
>> +++ head/etc/rc.d/hostid    Fri May  8 23:36:31 2015    (r282672)
>> @@ -58,7 +58,7 @@ hostid_set()
>>
>> valid_hostid()
>> {
>> -    uuid=$1
>> +    uuid=$(echo $1 | tr '[:upper:]' '[:lower:]')
>
> tr is in /usr/bin so this breaks systems with a separate /usr.  Perhaps you could use dd with conv=lcase instead?

FWIW this broke hostid on my system, causing zfs to refuse to import
one of my pools.  In particular the lack of tr caused hostid to fail
entirely, causing the hostid to change each time.

Is there a reason that the uuid has to be lowercase in the first place?


-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgnFdtjY%2BSRtoRcyqhQGSbrefknfJhxfjALuGsjXMyRLRw>