mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-07-09 08:42:03 +08:00
set hostname to tici-<serial_number> (#89)
* set hostname to tici-<serial_number> * runs as root
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Sets the hostname to the device's serial number
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=oneshot
|
||||
ExecStart=/usr/comma/set-hostname.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -8,6 +8,7 @@ systemctl enable cdsprpcd
|
||||
|
||||
# Enable our services
|
||||
systemctl enable fs_setup.service
|
||||
systemctl enable serial-hostname.service
|
||||
systemctl enable comma.service
|
||||
systemctl enable gpio.service
|
||||
systemctl enable lte.service
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SERIAL="$(cat /proc/cmdline | sed -e 's/^.*androidboot.serialno=//' -e 's/ .*$//')"
|
||||
echo "serial: '$SERIAL'"
|
||||
hostname "tici-$SERIAL"
|
||||
Reference in New Issue
Block a user