forked from ungleich-public/cdist
[type/__hostname] Add support for OpenWrt
This commit is contained in:
parent
c7c3075f62
commit
10abe514b8
2 changed files with 7 additions and 0 deletions
|
@ -69,6 +69,9 @@ in
|
|||
centos|fedora|redhat|scientific|freebsd|netbsd|openbsd|gentoo|void)
|
||||
echo "hostname '$name_should'"
|
||||
;;
|
||||
openwrt)
|
||||
echo "echo '$name_should' >/proc/sys/kernel/hostname"
|
||||
;;
|
||||
macosx)
|
||||
echo "scutil --set HostName '$name_should'"
|
||||
;;
|
||||
|
|
|
@ -149,6 +149,10 @@ in
|
|||
openbsd)
|
||||
echo "$name_should" | __file /etc/myname --source -
|
||||
;;
|
||||
openwrt)
|
||||
__uci system.@system[0].hostname --value "$name_should"
|
||||
# --transaction hostname
|
||||
;;
|
||||
slackware)
|
||||
# We write the FQDN into /etc/HOSTNAME. But /etc/rc.d/rc.M will only
|
||||
# read the first component from this file and set it as the running
|
||||
|
|
Loading…
Reference in a new issue