bluez: default enable bluetooth services

This commit is contained in:
Christian Hewitt 2018-09-26 12:10:12 +04:00
parent 46f6d4e931
commit 40622b2cea
4 changed files with 17 additions and 1 deletions

View File

@ -56,9 +56,13 @@ post_makeinstall_target() {
sed -i $INSTALL/etc/bluetooth/main.conf \
-e "s|^#\[Policy\]|\[Policy\]|g" \
-e "s|^#AutoEnable.*|AutoEnable=true|g"
mkdir -p $INSTALL/usr/share/services
cp -P $PKG_DIR/default.d/*.conf $INSTALL/usr/share/services
}
post_install() {
enable_service bluetooth-defaults.service
enable_service bluetooth.service
enable_service obex.service
}

View File

@ -0,0 +1,11 @@
[Unit]
Description=Bluetooth defaults
After=local-fs.target
ConditionPathExists=!/storage/.cache/services/bluez.conf
ConditionPathExists=!/storage/.cache/services/bluez.disabled
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'cp /usr/share/services/bluez.conf /storage/.cache/services/'
RemainAfterExit=yes

View File

@ -1,6 +1,7 @@
[Unit]
Description=Bluetooth service
Requires=bluetooth.target
After=syslog.target bluetooth-defaults.service
Requires=bluetooth-defaults.service
ConditionPathExists=/storage/.cache/services/bluez.conf