Skip to content

Commit

Permalink
Only trim serial number for hostname
Browse files Browse the repository at this point in the history
Serial numbers previously were limited to 4 characters everywhere. This
changes the configuration so that they're only limited for hostnames
where there's some benefit of making them easier to type. Everywhere
else can use the whole serial number or decide what part of it they
want.
  • Loading branch information
fhunleth committed Jul 8, 2024
1 parent a9fe719 commit 1998823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rootfs_overlay/etc/boardid.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
-b uboot_env -u nerves_serial_number
-b uboot_env -u serial_number

# Last resort: use 4 digits of the RPi's unique ID as the serial number
-b rpi -n 4
# Default: use the the RPi's unique ID as the serial number.
-b rpi
4 changes: 2 additions & 2 deletions rootfs_overlay/etc/erlinit.config
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
# Erlang release search path
-r /srv/erlang

# Assign a hostname of the form "nerves-<serial_number>".
# Assign a hostname of the form "nerves-<last 4 chars of the serial number>".
# See /etc/boardid.config for locating the serial number.
-d /usr/bin/boardid
-n nerves-%s
-n nerves-%-.4s

# If using shoehorn (https://github.com/nerves-project/shoehorn), start the
# shoehorn OTP release up first. If shoehorn isn't around, erlinit fails back
Expand Down

0 comments on commit 1998823

Please sign in to comment.