JSPM

hostnamegen

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q21746F
  • License ISC

Hostname Generator for RPi Base32 of Serial CPU ID.

Package Exports

  • hostnamegen

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hostnamegen) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hostname Generator

The unique identifier generator for RPi

TESTE ET FONCTIONNEL SUR Raspberry Pi / Raspbian ONLY !

Install

sudo npm install -g hostnamegen

How does it work ?

  • On RPi, a unique identifier depending ONLY from the CPU can be found into /proc/cpuinfos : Serial line (exple : 000000003f14bce2 )

  • This unique identifier is not dependent from the OS or the SD card so you can cahnge and use any and still have the same identifier.

  • Once this serial UID extracted, it is converted from base16 (Hex) to Base32 from Douglas Crockford to be more human friendly.

  • Change /etc/hostname & /etc/hosts files.

Usage

hostnamegen

Generate a UID based on CPU Serial and print it only.

sudo hostnamegen -s 

Generate and Setup hostname, need reboot after use to take effect.

sudo hostnamegen -s myhostname

Setup Hostname with specific hostname in params, need reboot after use to take effect.