mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-09-29 10:53:51 +08:00
set hostname through network manager
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Description=Sets the hostname to the device's serial number
|
||||
After=NetworkManager.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
|
||||
@@ -3,4 +3,4 @@ set -e
|
||||
|
||||
SERIAL="$(cat /proc/cmdline | sed -e 's/^.*androidboot.serialno=//' -e 's/ .*$//')"
|
||||
echo "serial: '$SERIAL'"
|
||||
hostname "tici-$SERIAL"
|
||||
nmcli general hostname "tici-$SERIAL"
|
||||
|
||||
Reference in New Issue
Block a user