Merge pull request #3054 from chewitt/bt-default-on

bluez: default enable bluetooth services
This commit is contained in:
MilhouseVH 2018-11-04 02:17:21 +00:00 committed by GitHub
commit b7c43ab44b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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