Files
agnos-builder/userspace/usr/comma/set-hostname.sh
T
Greg Hogan bc20686ddf hostname with serial number (#180)
* hostname with serial number

* add systemd.hostname kernel param

* /etc/hostname is now a symlink

* probably shouldn't have moved that

* fix path

* force symlink

* update kernel load script to support passing in device name

* remove kernel param

* change hostname from tici to comma

* bump kernel
2023-11-08 10:53:28 -08:00

7 lines
168 B
Bash
Executable File

#!/bin/bash
set -e
SERIAL="$(cat /proc/cmdline | sed -e 's/^.*androidboot.serialno=//' -e 's/ .*$//')"
echo "serial: '$SERIAL'"
sysctl kernel.hostname="comma-$SERIAL"