File: sparc-solaris-hostid.sh

package info (click to toggle)
loop-aes-utils 2.12p-4sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,644 kB
  • ctags: 5,072
  • sloc: ansic: 46,123; sh: 7,606; makefile: 884; perl: 86; csh: 62; sed: 55
file content (13 lines) | stat: -rwxr-xr-x 446 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# This script reproduces the output of the Solaris hostid program.
# It might be put in /usr/bin/hostid or so.
# Note that the hostid program does not have any known uses
# and does not exist on other architectures.
# Copyright 1999 Peter Jones, <pjones@redhat.com> .  
# GPL and all that good stuff apply.
(
idprom=`cat /proc/openprom/idprom`
echo $idprom|dd bs=1 skip=2 count=2
echo $idprom|dd bs=1 skip=27 count=6
echo
) 2>/dev/null