Providence SALUMU avatar Providence SALUMU committed 046f50d

initial commit

Comments (0)

Files changed (4)

polkit-1/rules.d/10-udisks.rules

+polkit.addRule(function(action, subject) {
+    if (action.id == "org.freedesktop.udisks.filesystem-mount-system-internal" &&
+        subject.user == "smunix" {
+        return "yes";
+    }
+});

polkit-1/rules.d/50-default.rules

+/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
+
+// DO NOT EDIT THIS FILE, it will be overwritten on update
+//
+// Default rules for polkit
+//
+// See the polkit(8) man page for more information
+// about configuring polkit.
+
+// polkit.addAdminRule(function(action, subject) {
+//   return ["unix-user:0"];
+// });
+
+polkit.addAdminRule(function(action, subject) {
+   return ["unix-group:wheel"];
+});

polkit-1/rules.d/50-mount-disk.rules

+/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
+
+// Mount disk by plugdev group rules for polkit
+//
+
+polkit.addRule(function(action, subject) {
+    if (action.id.indexOf("org.freedesktop.udisks2.") == 0 &&
+        subject.isInGroup("plugdev")) {
+             return polkit.Result.YES;
+   }
+});
+filter btrfsdisks {
+           optical = false
+           partition_table = false
+           usage = filesystem
+           type = btrfs
+       }
+
+filter disks {
+           optical = false
+           partition_table = false
+           usage = filesystem
+       }
+
+filter optical {
+          optical = true
+          }
+
+match btrfsdisks {
+           automount = true
+           automount_options = { noatime }
+           post_insertion_command = "udisks --mount %device_file --mount-options rw,noauto,noatime,async,space_cache"
+           post_mount_command = "echo \'udisks_glue:mount_device(\"%device_file\",\"%mount_point\",\"Usb\")\' | awesome-client"
+           post_unmount_command = "echo \'udisks_glue:unmount_device(\"%device_file\",\"%mount_point\",\"Usb\")\' | awesome-client"
+           post_removal_command = "echo \'udisks_glue:remove_device(\"%device_file\",\"%mount_point\",\"Usb\")\' | awesome-client"
+       }
+
+match disks {
+           automount = true
+           automount_options = { noatime }
+           post_insertion_command = "udisks --mount %device_file"
+           post_mount_command = "echo \'udisks_glue:mount_device(\"%device_file\",\"%mount_point\",\"Usb\")\' | awesome-client"
+           post_unmount_command = "echo \'udisks_glue:unmount_device(\"%device_file\",\"%mount_point\",\"Usb\")\' | awesome-client"
+           post_removal_command = "echo \'udisks_glue:remove_device(\"%device_file\",\"%mount_point\",\"Usb\")\' | awesome-client"
+       }
+
+
+match optical {
+          automount = true
+          automount_options = ro
+          post_mount_command = "echo \'udisks_glue:mount_device(\"%device_file\",\"%mount_point\",\"Cdrom\")\' | awesome-client"
+          post_unmount_command = "echo \'udisks_glue:unmount_device(\"%device_file\",\"%mount_point\",\"Cdrom\")\' | awesome-client"
+          post_removal_command = "echo \'udisks_glue:remove_device(\"%device_file\",\"%mount_point\",\"Cdrom\")\' | awesome-client"
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.