#!/bin/sh | |
# A shortcut to print the serial number of this device. | |
serial=$(cat /etc/serial) | |
if [ -n "$serial" ]; then | |
echo "$serial" | |
exit 0 | |
fi | |
serial=$(hnvram -qr 1ST_SERIAL_NUMBER 2>/dev/null) | |
if [ -n "$serial" ]; then | |
echo "$serial" | |
exit 0 | |
fi | |
serial=$(hnvram -qr SERIAL_NO 2>/dev/null) | |
if [ -n "$serial" ]; then | |
echo "$serial" | |
exit 0 | |
fi | |
exit 1 |