Skip to content

Commit d257e50

Browse files
committed
Only trim serial number for hostname
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.
1 parent 496bf6a commit d257e50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rootfs_overlay/etc/boardid.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
-b uboot_env -u nerves_serial_number
1717
-b uboot_env -u serial_number
1818

19-
# Last resort: use 4 digits of the RPi's unique ID as the serial number
20-
-b rpi -n 4
19+
# Default: use the the RPi's unique ID as the serial number.
20+
-b rpi

rootfs_overlay/etc/erlinit.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@
7070
# Erlang release search path
7171
-r /srv/erlang
7272

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

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

0 commit comments

Comments
 (0)