summaryrefslogtreecommitdiff
path: root/files/etc/board.d/90-set_hostname
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2018-07-31 12:18:23 +0000
committerMikael Magnusson <mikma@users.sourceforge.net>2018-07-31 12:18:23 +0000
commit0cf7f39c160240e18253de3e8afec873b3efa85e (patch)
tree23424f419bb7c52e59526dad30a3090d3e1c3678 /files/etc/board.d/90-set_hostname
parent0c5ad68128d49fec8b8770c343f30360c91c1b81 (diff)
Set hostname
Diffstat (limited to 'files/etc/board.d/90-set_hostname')
-rwxr-xr-xfiles/etc/board.d/90-set_hostname14
1 files changed, 14 insertions, 0 deletions
diff --git a/files/etc/board.d/90-set_hostname b/files/etc/board.d/90-set_hostname
new file mode 100755
index 0000000..fae4b3c
--- /dev/null
+++ b/files/etc/board.d/90-set_hostname
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+json_is_a system object && exit 0
+
+ucidef_set_hostname "$(uname -n)"
+
+board_config_flush
+
+exit 0