Skip to content

Commit 991a4b8

Browse files
committed
fix polkit rules installation script
the dpkg-query test was inverted the rules directory should be /usr/share/polkit-1
1 parent 774b79b commit 991a4b8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Fix missing zeroconf installation when executing `./install.sh --all`. Thanks to @Jef239 [#520](https://github.com/Stefal/rtkbase/issues/520)
1111
- Fix crash whith empty zeroconf service list and missing WinPcap. Thanks to @Jef239 [#520](https://github.com/Stefal/rtkbase/issues/520)
1212
- Fix tcp host addr not read/saved correctly. Thanks to @y3nd
13-
- Fix polkit rules to be able to start/stop rtkbase services without sudo privileges.
13+
- Fix polkit path and rules to be able to start/stop rtkbase services without sudo privileges.
1414

1515
### Deprecated
1616

tools/install_polkit_rules.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ RTKBASE_USER=$1
77
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
88

99
add_polkit_rules() {
10-
cp "${SCRIPT_DIR}"/polkit/*.rules /etc/polkit-1/rules.d/ && \
10+
cp "${SCRIPT_DIR}"/polkit/*.rules /usr/share/polkit-1/rules.d/ && \
1111
groupadd -f rtkbase && \
1212
usermod -a -G rtkbase "${RTKBASE_USER}"
1313
}
1414

1515
#check if polkitd package is available, else exit
1616
apt-cache --quiet=0 show polkitd 2>&1 | grep -q 'No packages found' && exit 1
1717
#install it if not already installed
18-
! dpkg-query -W --showformat='${Status}\n' polkitd >/dev/null 2>&1 && apt-get -y install polkitd
18+
dpkg-query -W --showformat='${Status}\n' polkitd >/dev/null 2>&1 && apt-get -y install polkitd
1919
add_polkit_rules

0 commit comments

Comments
 (0)