From 83fab3a54be1f97c6cee7adaebe9eb5e5e5d22c1 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 23 Jun 2020 10:29:10 +0200 Subject: [PATCH] Convert the README to Markdown Shithub decided not to render symlinked pod files sometime in the past year (github/markup#1253) so let's add a Markdown version generated by pod2markdown. --- Makefile | 5 ++- README.md | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.pod | 1 - 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 README.md delete mode 120000 README.pod diff --git a/Makefile b/Makefile index c4f22da..8d94c15 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,9 @@ doc: ldm.pod ldmc.pod @pod2man --section=1 --center="ldm Manual" --name "ldm" --release="$(VERSION)" ldm.pod > ldm.1 @pod2man --section=1 --center="ldmc Manual" --name "ldmc" --release="$(VERSION)" ldmc.pod > ldmc.1 +readme: ldm.pod + @pod2markdown -u ldm.pod README.md + clean: $(RM) *.o *.1 ldm ldmc ldm.service @@ -67,4 +70,4 @@ uninstall: $(RM) $(DESTDIR)/usr/share/man/man1/ldmc.1 $(RM) $(DESTDIR)$(SYSTEMDDIR)/system/ldm.service -.PHONY: all debug clean mrproper install install-main install-systemd uninstall service +.PHONY: all debug clean mrproper install install-main install-systemd uninstall service readme diff --git a/README.md b/README.md new file mode 100644 index 0000000..199bee4 --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ +# NAME + +ldm - Lightweight Device Mounter + +# SYNOPSIS + +_ldm_ \[-d\] \[-u _user_\] \[-p _path_\] \[-c _command_\] \[-m _mask_\] \[-h\] + +# DESCRIPTION + +ldm is a lightweight device mounter following the UNIX philosophy written in C and based on udev and libmount. +The user can use **umount** to unmount the device or **ldmc** with the **-r** switch. +The daemon can be controlled with the **ldmc** tool. + +# OPTIONS + +- **-d** + + Run ldm as a daemon. + +- **-u** _user_ + + Specify the user who owns the mountpoints. + +- **-p** _path_ + + Specify the base folder for the mount points. The default is /mnt. + +- **-m** _fmask_,_dmask_ + + Specify the fmask and dmask for the mounted devices in octal or symbolic format (eg. the octal mask + 0777 is represented as rwxrwxrwx). + + If only the _fmask_ is specified then its used as umask and it's + value is used as dmask too. + +- **-c** _command_ + + Specifies a command that is executed after a successful mount/unmount action. The following environment variables are defined : + + - **LDM\_MOUNTPOINT** + + The complete path to the mountpoint. + + - **LDM\_NODE** + + The path pointing to the device node in /dev + + - **LDM\_FS** + + The filesystem on the mounted device. + + - **LDM\_ACTION** + + The action ldm has just performed, it can either be _mount_, _pre\_unmount_ or _unmount_ + +- **-h** + + Print a brief help and exit. + +# BLACKLISTING + +ldm doesn't offer any blacklisting by itself but it honors the options found in the fstab so it will ignore any device with flag _noauto_. + +# INSTALL + +The included systemd service expects a config file at /etc/ldm.conf similar to this: + +
+
+    
+    MOUNT_OWNER=username
+    BASE_MOUNTPOINT=/mnt
+    FMASK_DMASK=fmask,dmask
+    EXTRA_ARGS=-c <path_to_executable>
+    
+    
+
+ +The options **FMASK\_DMASK** and **EXTRA\_ARGS** are optional. +The default value for **FMASK\_DMASK** is _0133,0022_. +**EXTRA\_ARGS** will be appended to the _ldm_ executable. + +# SEE ALSO + +ldmc(1), umount(8) + +# WWW + +[git repository](https://github.com/LemonBoy/ldm) + +# AUTHOR + +2011-2019 (C) The Lemon Man diff --git a/README.pod b/README.pod deleted file mode 120000 index efafc07..0000000 --- a/README.pod +++ /dev/null @@ -1 +0,0 @@ -ldm.pod \ No newline at end of file