aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/isodumper6
-rwxr-xr-xisodumper14
-rw-r--r--share/polkit-1/actions/org.mageia.isodumper.policy30
3 files changed, 37 insertions, 13 deletions
diff --git a/bin/isodumper b/bin/isodumper
new file mode 100644
index 0000000..be2c8a3
--- /dev/null
+++ b/bin/isodumper
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [[ "$EUID" != "0" ]] ; then
+ exec /usr/bin/pkexec /usr/libexec/isodumper "$@"
+else
+ exec /usr/libexec/isodumper "$@"
+fi
diff --git a/isodumper b/isodumper
index 5e4467a..94dfbb4 100755
--- a/isodumper
+++ b/isodumper
@@ -1,16 +1,4 @@
#!/bin/sh
#
-# Yes that script is horribly ugly and it would be nice if someone
-# would implement the pkill pinging in the pythn script or even write
-# a safe replacement for dd at all with proper progress reporting
-# directly in the python script instead of that hack.
-set -e
-
-TERM=xterm
-
-DIR=/usr/lib/isodumper
-
-watch -n1 -- pkill -USR1 ^dd$ >/dev/null 2>&1 &
-MYPID=$!
-$DIR/isodumper.py && kill -9 $MYPID
+/usr/lib/isodumper/isodumper.py \ No newline at end of file
diff --git a/share/polkit-1/actions/org.mageia.isodumper.policy b/share/polkit-1/actions/org.mageia.isodumper.policy
new file mode 100644
index 0000000..03655f5
--- /dev/null
+++ b/share/polkit-1/actions/org.mageia.isodumper.policy
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>Mageia</vendor>
+ <vendor_url>http://mageia.org/</vendor_url>
+
+ <action id="org.mageia.isodumper.pkexec.run">
+ <description>Run Isodumper</description>
+ <description xml:lang="fr">Exécuter Isodumper</description>
+ <description xml:lang="ca">Isodumper</description>
+ <description xml:lang="ru">Isodumper</description>
+ <description xml:lang="sl">Isodumper</description>
+ <description xml:lang="tr">Isodumper</description>
+ <description xml:lang="uk">Isodumper</description>
+ <message>Authentication is required to run Isodumper</message>
+ <message xml:lang="fr">Une authentification est nécessaire pour exécuter IsoDumper</message>
+ <message xml:lang="ca">Per a accedir al Isodumper cal autenticació</message>
+ <icon_name>isodumper</icon_name>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/isodumper</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig> \ No newline at end of file