summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2014-07-19 14:38:19 -0700
committerGarrett D'Amore <garrett@damore.org>2014-07-21 09:22:30 -0700
commit7ab4e62e3b5c454f248a38bec0d489e8f5543324 (patch)
treee17014eb7bb026f0bbff505f06d5864252b4af34 /usr/src
parent95c635efb7c3b86efc493e0447eaec7aecca3f0f (diff)
downloadillumos-joyent-7ab4e62e3b5c454f248a38bec0d489e8f5543324.tar.gz
3346 svc-hostid uses perl stupidly
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Reviewed by: Adam Števko <adam.stevko@gmail.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/hostid/smf/svc-hostid5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/cmd/hostid/smf/svc-hostid b/usr/src/cmd/hostid/smf/svc-hostid
index 91edb71a95..818a863600 100644
--- a/usr/src/cmd/hostid/smf/svc-hostid
+++ b/usr/src/cmd/hostid/smf/svc-hostid
@@ -23,6 +23,8 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+#
. /lib/svc/share/smf_include.sh
@@ -36,8 +38,7 @@ if smf_is_globalzone; then
else
host=`/usr/bin/hostid`
echo "# DO NOT EDIT" > /etc/hostid
- r=`echo "0x${host}" | /usr/bin/perl -e \
- 'while(<STDIN>){chop;tr/!-~/P-~!-O/;print $_,"\n";}exit 0;'`
+ r=`echo "0x${host}" | /usr/bin/tr 'P-~!-O' '!-OP-~'`
printf "\"%s\"\n" $r >> /etc/hostid
fi
fi