connman: port hostname setup to systemd

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-05 20:08:26 +02:00
parent 1c9be56121
commit 682041952d
2 changed files with 14 additions and 0 deletions

View File

@ -116,6 +116,7 @@ post_install() {
}
post_install() {
enable_service hostname.service
enable_service connman.service
if [ "$PPTP_SUPPORT" = yes -o "$OPENVPN_SUPPORT" = yes ]; then
enable_service connman-vpn.service

View File

@ -0,0 +1,13 @@
[Unit]
Description=Setup Hostname
DefaultDependencies=no
ConditionPathExists=/storage/.cache/hostname
After=local-fs.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'cat /storage/.cache/hostname > /proc/sys/kernel/hostname'
RemainAfterExit=yes
[Install]
WantedBy=sysinit.target