From 3148ce868728675c0241ee4cdf7e5b50b2d585e5 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 21 May 2007 11:44:13 +0000 Subject: [PATCH] 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. --- etc/rc.d/hostid | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/rc.d/hostid b/etc/rc.d/hostid index 6673aa012391..9a6d39f9fcd6 100644 --- a/etc/rc.d/hostid +++ b/etc/rc.d/hostid @@ -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