svn commit: r282672 - head/etc/rc.d

Oliver Pinter oliver.pinter at hardenedbsd.org
Sun May 10 21:32:34 UTC 2015


On Sun, May 10, 2015 at 9:45 PM, John Baldwin <jhb at freebsd.org> wrote:
>
>> On May 8, 2015, at 19:36, Xin LI <delphij at 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?

Then these are affected too::

root at robot rc.d# grep -r -E '(awk| tr )' *
ftp-proxy:                      ps_pid=`ps ax -o pid= -o command= |
grep $cmd_string | grep -e "$flag_string" | grep -v grep | awk '{
print $1 }'`
growfs: rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }')
growfs:         rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" {
print $3 }')
growfs: sysctl -b kern.geom.conftxt | awk '
jail:           _j=$(echo $_j | tr /. _)
jail:   _j=$(echo $1 | tr /. _)
jail:                   _j=$(echo $_j | tr /. _)
jail:                   _j=$(echo $_j | tr /. _)
jail:           _j=$(echo $_j | tr /. _)
motd:   awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print
"\n"$0}} else {print}}' < /etc/motd >> ${T}
ntpdate:                ntpdate_hosts=`awk '
power_profile:  awk '{ split($0, a, "[/ ]"); print a[1] }' -) 2> /dev/null`"
power_profile:  awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }'
-) 2> /dev/null`"
sshd:   local ALG="$(echo $alg | tr a-z A-Z)"
syscons:                for i in `kldstat | awk '$5 ~ "_saver\.ko$" {
print $5 }'`; do
syslogd:        for _s in `cat $sockfile | tr '\n' ' '` ; do
virecover:                              recfile=`awk
'/^X-vi-recover-path:/{print $2}' < "${i}"`


The awk is located in /usr/bin/awk too, and for e.g. the growfs should
running in the very first steps...

>
>
> --
> John Baldwin
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"


More information about the svn-src-head mailing list