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/hostid has just the root filesystem (and this way mainly the tools in /bin) available. I've chosen csh(1) here as the string manipulation tools available in /bin is extremely limited and the (only) alternative ed(1) usage would have been a lot more complicated or even might require a temporary file.
This commit is contained in:
parent
b8fdb7f911
commit
3148ce8687
@ -56,7 +56,8 @@ hostid_set()
|
||||
|
||||
hostid_hardware()
|
||||
{
|
||||
uuid=`kenv smbios.system.uuid 2>/dev/null | tr '[:upper:]' '[:lower:]'`
|
||||
uuid=`kenv smbios.system.uuid 2>/dev/null`
|
||||
uuid=`csh -c 'echo -n ${*:al}' "$uuid"`
|
||||
x="[0-9a-f]"
|
||||
y=$x$x$x$x
|
||||
case "${uuid}" in
|
||||
|
Loading…
Reference in New Issue
Block a user