X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=bin%2Fkhatus_actuate_device_add_to_automount;h=a1e1448f70d925656f4f73d88af0202f6f76b37f;hb=2e820ad561199f2ccc1ee3fa7e7e708e5dc8bc39;hp=2c30f9ff7f7fdf551e2a68bf95d78df75a194174;hpb=dffa7e60e41726915acce4bf769e3422ac0759bd;p=khatus.git diff --git a/bin/khatus_actuate_device_add_to_automount b/bin/khatus_actuate_device_add_to_automount index 2c30f9f..a1e1448 100755 --- a/bin/khatus_actuate_device_add_to_automount +++ b/bin/khatus_actuate_device_add_to_automount @@ -5,6 +5,8 @@ BEGIN { OFS = msg_fs ? msg_fs : "|" Kfs = key_fs ? key_fs : ":" Module = "khatus_actuate_device_add_to_automount" + # Typically some file manager (thunar, pcmanfm, etc.), but can be whatever. + Execute_On_Mount = Execute_On_Mount ? Execute_On_Mount : "" } $1 == "OK" && \ @@ -33,6 +35,9 @@ function mount_device(path, cmd, line, lines, line_count, status, i, sub("^Mounted " path_dev " at ", "", path_mnt) sub("\.$", "", path_mnt) alert("low", "successfully-mounted", path_dev " to " path_mnt) + if (Execute_On_Mount) { + system(Execute_On_Mount " '" path_mnt "'") + } } else { alert("hi", "unexpected-success-line", line) }