File tree Expand file tree Collapse file tree 2 files changed +22
-12
lines changed
Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -36,16 +36,21 @@ function post_family_tweaks_bsp__aic8800_wireless() {
3636 EOT
3737 # Add AIC8800 Bluetooth Service and Script
3838 if [[ -d " $SRC/packages/bsp/aic8800" ]]; then
39- mkdir -p " ${destination}" /etc/systemd/system
40- mkdir -p " ${destination}" /usr/bin
41- cp -f " $SRC/packages/bsp/aic8800/aic-bluetooth" " ${destination}" /usr/bin
42- chmod +x " ${destination}" /usr/bin/aic-bluetooth
43- cp -f " $SRC/packages/bsp/aic8800/aic-bluetooth.service" " ${destination}" /etc/systemd/system
39+ install -d -m 0755 " ${destination}/usr/bin"
40+ install -m 0755 " $SRC/packages/bsp/aic8800/aic-bluetooth" " ${destination}/usr/bin/aic-bluetooth"
41+ install -d -m 0755 " ${destination}/usr/lib/systemd/system"
42+ install -m 0644 " $SRC/packages/bsp/aic8800/aic-bluetooth.service" " ${destination}/usr/lib/systemd/system/aic-bluetooth.service"
43+ else
44+ display_alert " $BOARD" " Skipping AIC8800 BT assets (packages/bsp/aic8800 not found)" " warn"
4445 fi
4546}
4647
4748# Enable AIC8800 Bluetooth Service
4849function post_family_tweaks__enable_aic8800_bluetooth_service() {
4950 display_alert " $BOARD" " Enabling AIC8800 Bluetooth Service" " info"
50- chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
51+ if chroot_sdcard test -f /lib/systemd/system/aic-bluetooth.service || chroot_sdcard test -f /etc/systemd/system/aic-bluetooth.service; then
52+ chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
53+ else
54+ display_alert " $BOARD" " aic-bluetooth.service not found in image; skipping enable" " warn"
55+ fi
5156}
Original file line number Diff line number Diff line change @@ -39,17 +39,22 @@ function post_family_tweaks_bsp__aic8800_wireless() {
3939 EOT
4040 # Add AIC8800 Bluetooth Service and Script
4141 if [[ -d " $SRC/packages/bsp/aic8800" ]]; then
42- mkdir -p " ${destination}" /etc/systemd/system
43- mkdir -p " ${destination}" /usr/bin
44- cp -f " $SRC/packages/bsp/aic8800/aic-bluetooth" " ${destination}" /usr/bin
45- chmod +x " ${destination}" /usr/bin/aic-bluetooth
46- cp -f " $SRC/packages/bsp/aic8800/aic-bluetooth.service" " ${destination}" /etc/systemd/system
42+ install -d -m 0755 " ${destination}/usr/bin"
43+ install -m 0755 " $SRC/packages/bsp/aic8800/aic-bluetooth" " ${destination}/usr/bin/aic-bluetooth"
44+ install -d -m 0755 " ${destination}/usr/lib/systemd/system"
45+ install -m 0644 " $SRC/packages/bsp/aic8800/aic-bluetooth.service" " ${destination}/usr/lib/systemd/system/aic-bluetooth.service"
46+ else
47+ display_alert " $BOARD" " Skipping AIC8800 BT assets (packages/bsp/aic8800 not found)" " warn"
4748 fi
4849}
4950
5051# Enable AIC8800 Bluetooth Service
5152function post_family_tweaks__enable_aic8800_bluetooth_service() {
5253 display_alert " $BOARD" " Enabling AIC8800 Bluetooth Service" " info"
53- chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
54+ if chroot_sdcard test -f /lib/systemd/system/aic-bluetooth.service || chroot_sdcard test -f /etc/systemd/system/aic-bluetooth.service; then
55+ chroot_sdcard systemctl --no-reload enable aic-bluetooth.service
56+ else
57+ display_alert " $BOARD" " aic-bluetooth.service not found in image; skipping enable" " warn"
58+ fi
5459}
5560
You can’t perform that action at this time.
0 commit comments