summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorrse <rse@FreeBSD.org>2007-05-21 11:44:13 +0000
committerrse <rse@FreeBSD.org>2007-05-21 11:44:13 +0000
commit0860e323d57b3a627e1d9cc204cff9e86ef5f4e2 (patch)
treeaa13a56dbd8e51abd80fc663c32483c114628066 /etc/rc.d
parent8e5e208b6fee9f511574490356733b6db9314905 (diff)
downloadFreeBSD-src-0860e323d57b3a627e1d9cc204cff9e86ef5f4e2.zip
FreeBSD-src-0860e323d57b3a627e1d9cc204cff9e86ef5f4e2.tar.gz
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.
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/hostid3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.d/hostid b/etc/rc.d/hostid
index 6673aa0..9a6d39f 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
OpenPOWER on IntegriCloud