Add polkit rule to enable modemamanger for users in group plugdev
This commit is contained in:
parent
8b52988ad2
commit
546d2209a7
2 changed files with 10 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -23,6 +23,9 @@ install: programs/sxmo_setpineled programs/sxmo_setpinebacklight programs/sxmo_s
|
|||
mkdir -p $(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
|
||||
cp scripts/*/* $(PREFIX)/usr/bin
|
||||
|
||||
|
|
7
configs/00-sxmo.rules
Normal file
7
configs/00-sxmo.rules
Normal file
|
@ -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…
Add table
Add a link
Reference in a new issue