path: root/doc/forum/newbie_trying_to_set_up_NFS_mount
diff options
authorJoey Hess2016-04-05 11:09:57 -0400
committerJoey Hess2016-04-05 11:09:57 -0400
commit7070899c187a3d2c6be538b8497428a23ae096f3 (patch)
tree4e1e57417e02b2967a6e6edfb0bbbf81b65706d7 /doc/forum/newbie_trying_to_set_up_NFS_mount
parent88dbf97a3678325340a7c10608c9552e0516faaf (diff)
Diffstat (limited to 'doc/forum/newbie_trying_to_set_up_NFS_mount')
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/forum/newbie_trying_to_set_up_NFS_mount/comment_1_8524e66ddfa2d21ae7b70f257984fc2c._comment b/doc/forum/newbie_trying_to_set_up_NFS_mount/comment_1_8524e66ddfa2d21ae7b70f257984fc2c._comment
new file mode 100644
index 00000000..0a4367d9
--- /dev/null
+++ b/doc/forum/newbie_trying_to_set_up_NFS_mount/comment_1_8524e66ddfa2d21ae7b70f257984fc2c._comment
@@ -0,0 +1,30 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-04-05T14:53:53Z"
+ content="""
+The easy way to translate your command to a property is:
+ cmdProperty "mount" ["-t", "nfs", "", "/mnt/nfs"]
+ `assume` MadeChange
+This has the benefit of working with any command you might want,
+and the drawback of not preventing eg, re-mounting an already
+mounted device.
+`mounted` takes a `MountOpts` which is a specialized data type.
+You can construct one with eg, `(MountOpts ["defaults"])`.
+But, since `MountOpts` is a `Monoid`, and "defaults" is the default of an
+empty `MountOpts`, you can more simply use `mempty` to get the default one:
+ Mount.mounted "nfs" "" "/mnt/nfs" mempty
+Propellor.Property.Mount was mostly written for use by some other
+properties, and so doesn't really target the end user as much. And, I
+notice, its `mounted` property doesn't check if the device is already
+mounted and so will try to re-mount unnecessarily.
+I'm not sure if manually driving the mount command makes the most sense;
+wouldn't it be better to have a property that updates /etc/fstab?