summaryrefslogtreecommitdiff
path: root/Assistant.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-19 13:01:41 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-19 13:04:33 -0400
commitf20a40f9d4a4574c9f88dac8fd02b73d7f594b8b (patch)
tree7568c61c06eec039a0ff4a52fff7abe795c0bfa9 /Assistant.hs
parente2c86a4b582bf222a51e9bb9066edce204d68ac8 (diff)
MountWatcher thread
Currently only prints mount points when mounts happen.
Diffstat (limited to 'Assistant.hs')
-rw-r--r--Assistant.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Assistant.hs b/Assistant.hs
index 06484b086..51639584c 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -46,6 +46,11 @@
- Wakes up periodically and records the daemon's status to disk.
- Thread 12: sanity checker
- Wakes up periodically (rarely) and does sanity checks.
+ - Thread 13: mount watcher
+ - Either uses dbus to watch for drive mount events, or, when
+ - there's no dbus, polls to find newly mounted filesystems.
+ - Once a filesystem that contains a remote is mounted, syncs
+ - with it.
-
- ThreadState: (MVar)
- The Annex state is stored here, which allows resuscitating the
@@ -92,6 +97,7 @@ import Assistant.Threads.Merger
import Assistant.Threads.TransferWatcher
import Assistant.Threads.Transferrer
import Assistant.Threads.SanityChecker
+import Assistant.Threads.MountWatcher
import qualified Utility.Daemon
import Utility.LogFile
import Utility.ThreadScheduler
@@ -127,6 +133,7 @@ startDaemon assistant foreground
, transfererThread st dstatus transferqueue transferslots
, daemonStatusThread st dstatus
, sanityCheckerThread st dstatus transferqueue changechan
+ , mountWatcherThread st dstatus
, watchThread st dstatus transferqueue changechan
]
waitForTermination