Add polkit rule to enable modemamanger for users in group plugdev

master
Miles Alan 5 years ago
parent 8b52988ad2
commit 546d2209a7
  1. 3
      Makefile
  2. 7
      configs/00-sxmo.rules

@ -23,6 +23,9 @@ install: programs/sxmo_setpineled programs/sxmo_setpinebacklight programs/sxmo_s
mkdir -p $(PREFIX)/etc/alsa/conf.d/ mkdir -p $(PREFIX)/etc/alsa/conf.d/
cp configs/alsa_sxmo_enable_dmix.conf $(PREFIX)/etc/alsa/conf.d/ cp configs/alsa_sxmo_enable_dmix.conf $(PREFIX)/etc/alsa/conf.d/
mkdir -p $(PREFIX)/etc/polkit-1/rules.d
cp configs/00-sxmo.rules $(PREFIX)/etc/polkit-1/rules.d/
mkdir -p $(PREFIX)/usr/bin mkdir -p $(PREFIX)/usr/bin
cp scripts/*/* $(PREFIX)/usr/bin cp scripts/*/* $(PREFIX)/usr/bin

@ -0,0 +1,7 @@
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.ModemManager1.") == 0 &&
subject.isInGroup("plugdev")) {
return polkit.Result.YES;
}
});
Loading…
Cancel
Save