Use pkexec --disable-internal-agent for polkit.

Don't warn on Unknown property "Form Factor".
This commit is contained in:
Alexander Shaduri
2017-08-27 19:07:52 +00:00
parent 1e72729056
commit 40e08796d1
3 changed files with 6 additions and 4 deletions
-3
View File
@@ -28,9 +28,6 @@ Bugs / patches:
TODO:
Implement PolKit support.
Don't rely on smartctl return code (2), parse the output instead.
This will allow us to show the Info page.
+1 -1
View File
@@ -138,7 +138,7 @@ if [ "$GSMARTCONTROL_SU" != "" ]; then
full_cmd="$GSMARTCONTROL_SU '$EXEC_BIN $final_args_quoted'";
elif [ "$found_su" = "pkexec" ]; then
full_cmd="pkexec '$EXEC_BIN $final_args_quoted'";
full_cmd="pkexec --disable-internal-agent '$EXEC_BIN $final_args_quoted'";
elif [ "$found_su" = "sux" ]; then
full_cmd="xterm -e sux -c '$EXEC_BIN $final_args_quoted'";
@@ -483,6 +483,11 @@ bool SmartctlParser::parse_section_info_property(StorageProperty& p)
p.value_type = StorageProperty::value_type_string;
p.value_string = p.reported_value;
} else if (app_pcre_match("/^Form Factor$/mi", p.reported_name)) {
p.set_name(p.reported_name, "form_factor", "Form Factor");
p.value_type = StorageProperty::value_type_string;
p.value_string = p.reported_value;
} else if (app_pcre_match("/^Device is$/mi", p.reported_name)) {
p.set_name(p.reported_name, "in_smartctl_db", "In Smartctl Database");
p.value_type = StorageProperty::value_type_bool;