Describe the bug
When you run maestral autostart from the CLI, it calls ps -p 1 to find out if it's running in a systemd environment.
However, if the environment is using BusyBox to provide core shell utilities—common in embedded or lightweight environments where one might want to be running maestral to begin with—this will fail because BusyBox's psdoesn't recognise the -p option. Maestral will then report "Autostart is currently not supported for your platform."—regardless of whether the environment has systemd or not.
To Reproduce
In an environment reliant on busybox:
Install maestral in the normal way.
Run maestral autostart.
Given that you don't actually need systemd to demonstrate the bug, the easiest way to do this is probably to install maestral in a fresh alpine image from docker. A cursory search didn't turn up any systemd-based linux distributions which rely on busybox, ~which is probably not that surprising given the politics involved~.
Here's what it looks like on my reMarkable tablet:
```
reMarkable: ~/ maestral autostart
ps: invalid option -- 'p'
BusyBox v1.31.1 (2022-10-17 22:20:43 UTC) multi-call binary.
Usage: ps
Autostart is currently not supported for your platform.
Autostart requires systemd on Linux or launchd on macOS.
reMarkable: ~/ ps | head -n 2
PID USER VSZ STAT COMMAND
1 root 30228 S {systemd} /sbin/init
reMarkable: ~/
```
Expected behaviourmaestral autostart behaves as documented.
System:
Maestral version: 1.6.5
Python version: 3.10.7
OS: uname -a says: Linux reMarkable 5.4.70-v1.2.6-rm10x #1 Tue Oct 18 11:30:18 UTC 2022 armv7l GNU/Linux. It appears to be a custom distribution.
Desktop environment: n/a
PyQt version (for Linux GUI): n/a
Additional context
Obviously this isn't an earth-shatteringly important issue, since anyone mucking about with this sort of thing is likely to be perfectly happy creating the service files manually, but I thought I'd mention it.
Describe the bug When you run
maestral autostart
from the CLI, it callsps -p 1
to find out if it's running in a systemd environment.However, if the environment is using BusyBox to provide core shell utilities—common in embedded or lightweight environments where one might want to be running maestral to begin with—this will fail because BusyBox's
ps
doesn't recognise the-p
option. Maestral will then report "Autostart is currently not supported for your platform."—regardless of whether the environment has systemd or not.I ran into this while setting up Maestral on a reMarkable tablet.
To Reproduce In an environment reliant on busybox:
maestral autostart
.Given that you don't actually need systemd to demonstrate the bug, the easiest way to do this is probably to install maestral in a fresh alpine image from docker. A cursory search didn't turn up any systemd-based linux distributions which rely on busybox, ~which is probably not that surprising given the politics involved~.
Here's what it looks like on my reMarkable tablet:
``` reMarkable: ~/ maestral autostart ps: invalid option -- 'p' BusyBox v1.31.1 (2022-10-17 22:20:43 UTC) multi-call binary. Usage: ps Autostart is currently not supported for your platform. Autostart requires systemd on Linux or launchd on macOS. reMarkable: ~/ ps | head -n 2 PID USER VSZ STAT COMMAND 1 root 30228 S {systemd} /sbin/init reMarkable: ~/ ```
Expected behaviour
maestral autostart
behaves as documented.System:
uname -a
says:Linux reMarkable 5.4.70-v1.2.6-rm10x #1 Tue Oct 18 11:30:18 UTC 2022 armv7l GNU/Linux
. It appears to be a custom distribution.Additional context Obviously this isn't an earth-shatteringly important issue, since anyone mucking about with this sort of thing is likely to be perfectly happy creating the service files manually, but I thought I'd mention it.