The wait command will wait for all process known to the shell if no
arguments are passed, so in these cases looping does nothing.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Mepo is better - this sxmo_gpsutil.sh was hack script for foxtrotgps.
All of this stuff can be accomplished with mepo in a better way; also
this old script was X-compatible-only.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
This would likely only be the case in case of a crash, but
also if someone does sxmo_audio.sh or sxmo_brightness.sh
in start hook before sxmo_wob.sh it'll write a websocket
file so wob will fail.
Now, the menu defaults to editing the hook that you click on
(because that's why you went into the menu in the first place).
A separate menu is given for deleting the hooks.
This also shows the hook name rather than the file name.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
This places the debug statements a little better, also adds a comment to
alert the user not to rem stuff out of sxmo_hook_check_state_mutexes
without running freeall.
For some reason if we use sed -i flock drops it's lock before sed has
finished writing data. By emulating this with a tempfile and mv we
somehow avoid this condition.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
If one sed process started before the previous one finished, the changes
of all but the last one to finish would be lost.
Also I think if the grep is run at the same time as another sed process
it will might generate an outdated line number, causing sed to remove
the wrong lock item.
This is a relatively crude method for avoiding these race conditions,
until a method that doesn't need to lock it's lock can be developed.
I also also added compatibility with gnu xargs
Signed-off-by: Stacy Harper <contact@stacyharper.net>
On my laptop, rtcwake -m mem -s YEARS8 is too big and throws an error.
Fix: if suspend time is > YEARS8 just do rtcwake -m mem with no supsend
time.
However, I also thought making this a hook would be good. Users can
then either use systemctl or whatever they want to do the actual
suspend, or they can implement some smart check to hibernate instead of
suspend if battery is low, etc.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
I changed the sxmo_log calls in sxmo_daemons.sh to sxmo_debug, and I
added some sxmo_debug statements in inputhandlers and in check mutex.
These messages are useful for debug but not normal users.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
1. This patch tweaks the deviceprofile for pinenote.
2. It adds a COVERRTC check so that we can tell if we wake up via an
'open cover' signal.
3. It implements a simple locking mechanism: we have two states (unlock
and suspend). After SXMO_UNLOCK_IDLE_TIMEOUT (default is 30s) it
go into suspend. Before it suspends, we pretend to be in "SUSPEND"
state (update to statusbar). After suspend, we go back into unlock
state.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
This allows users with broken sxmo installs to still run
sxmo_migrate.sh to rescue their installs.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
If a system actually doesn't have busybox pkill, then this'll spam up
the logs with pkill: applet not found
Signed-off-by: Stacy Harper <contact@stacyharper.net>
An earlier patch switched us over to busybox rfkill, but didn't
switchover all rfkill instants to use new syntax.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
As we now use pipewire by default, I think most of our alsa configs are
useless now. At least removing them seems to not have any consequences.
- Remove unused alsa_sxmo_enable_dmix.conf
- Remove useless default_alsa_sound.conf
- Remove useless audio setup in the start hook
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>