mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 04:53:01 +02:00
- board/common: drop everything not needed by NETCONF mode - board/classic: most board/common helpers relocated here - Simplify Finit scripts for critical services - Source variant from /etc/os-release to select ramdisk /etc Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
17 lines
297 B
Bash
Executable File
17 lines
297 B
Bash
Executable File
#!/bin/sh
|
|
# Changes hostname in /etc/hostname and /etc/hosts
|
|
|
|
current=$(cat /etc/hostname)
|
|
newname=$1
|
|
|
|
[ -n "$newname" ] || exit 1
|
|
|
|
sed -i "s/$current/$newname/" /etc/hosts
|
|
sed -i "s/$current/$newname/" /etc/hostname
|
|
|
|
hostname $newname
|
|
|
|
initctl touch sysklogd
|
|
initctl touch dnsmasq
|
|
initctl reload
|