Skip to content

Commit

Permalink
[systemd] Do not use script to launch buteo-mtp binary
Browse files Browse the repository at this point in the history
The start-mtp.sh has a feature (create dummy directory for exposing parts of
user home directory via symlinks) that makes it look like it were a) meant
to be used for development time debugging, or b) some kind of attempt to
provide sandboxing.

While none of these features are needed in default setup, the ability to
control buteo-mtp environment from user editable files means they can be
activated without requiring any special prileges.

Launch buteo-mtp binary directly without involving launcher script.

To support things like controlling logging verbosity, add enablers for using
environment files in root writable directories.

Remove the now unused script altogether.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Feb 28, 2019
1 parent f04de40 commit f05ed72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
4 changes: 3 additions & 1 deletion init/systemd/buteo-mtp.service
Expand Up @@ -2,7 +2,9 @@
Description=MTP service

[Service]
ExecStart=/usr/lib/mtp/start-mtp.sh
EnvironmentFile=-/etc/sysconfig/buteo-mtp
EnvironmentFile=-/var/lib/environment/buteo-mtp/*.conf
ExecStart=/usr/lib/mtp/mtp_service $SERVICE_PARAMETERS
Restart=always
RestartSec=1
Nice=-10
2 changes: 1 addition & 1 deletion service/service.pro
Expand Up @@ -17,7 +17,7 @@ SOURCES += service.cpp

#install
target.path += /usr/lib/mtp/
target.files = start-mtp.sh mtp_service
target.files = mtp_service
desktop.path = /etc/xdg/autostart
desktop.files = buteo-mtp.desktop
INSTALLS += target desktop
Expand Down
20 changes: 0 additions & 20 deletions service/start-mtp.sh

This file was deleted.

0 comments on commit f05ed72

Please sign in to comment.