summarylogtreecommitdiffstats
path: root/indicator-sensors.install
blob: a4d5e3bcfd2ee633055edda68ea60b92a012ab22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
post_install() {
    cat << EOF
==> One way to solve Policykit/UDisks2 related errors ("Error:org.freedesktop.UDisks2.Error.NotAuthorized: Not authorized to perform operation") is to define the following rules in file /etc/polkit-1/rules.d/50-udisks.rules:

    polkit.addRule(function(action, subject) {
      var YES = polkit.Result.YES;
      var permission = {
        // only required for udisks2:
        "org.freedesktop.udisks2.ata-check-power": YES,
        "org.freedesktop.udisks2.ata-smart-update": YES,
      };
      if (subject.isInGroup("users")) {
        return permission[action.id];
      }
    });

    Then restart the polkit service.
EOF
}