from pathlib import Path


def get_serial() -> str:
    """Get the device serial number."""
    try:
        return Path("/var/serial").read_text().strip()
    except OSError:
        return "unknown"