Fix for polkit version detection

This commit is contained in:
Joshua Mesilane
2026-04-18 17:39:35 +10:00
parent 8ebcb09eff
commit 7ba26b72cb

View File

@@ -402,7 +402,7 @@ install_repeater() {
# Work out which version of polkit is installed
POLKIT_VERSION=`pkaction --version | awk '{print $NF}'`
if (( $(echo "$POLKIT_VERSION > 0.105"| bc -l) )); then
if [ `echo "$POLKIT_VERSION > 0.105"| bc -l` == '1' ]; then
echo "Polkit 0.106 or greater detected, using rules file"
echo ">>> Configuring polkit for service management..."
mkdir -p /etc/polkit-1/rules.d
@@ -771,7 +771,7 @@ upgrade_repeater() {
# Configure polkit for passwordless service restart
POLKIT_VERSION=`pkaction --version | awk '{print $NF}'`
if (( $(echo "$POLKIT_VERSION > 0.105"| bc -l) )); then
if [ `echo "$POLKIT_VERSION > 0.105"| bc -l` == "1" ]; then
echo "Polkit 0.106 or greater detected, using rules file"
echo ">>> Configuring polkit for service management..."
mkdir -p /etc/polkit-1/rules.d