A lightweight device mounter, with libudev as only dependency
Clone or download
Pull request Compare This branch is 7 commits ahead, 48 commits behind LemonBoy:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
Makefile
README.pod
ldm.1
ldm.c
ldm.debian.init
ldm.service
ldm_callback

README.pod

NAME

ldm - Lightweight Device Mounter

SYNOPSIS

ldm [-d] [-r device] [-g gid] [-u uid] [-p path] [-c command] [-h]

DESCRIPTION

ldm is a lightweight device mounter following the UNIX philosophy written in C and based on udev and libmount.

OPTIONS

-d

Run ldm as a daemon.

-r device

Ask the ldm daemon to unmount the selected device.

-g gid

Specify the gid of the user owning the mount points.

-u uid

Specify the uid of the user owning the mount points.

-p path

Specify the base folder for the mount points. The default is /mnt.

-c command

Specifies a command that is executed before and after a mount/unmount action. When the action is 'test' then ldm will block the current action if the script returns a non-zero value. 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_ACTION

The action ldm has just performed, it can either be mount, unmount or test

LDM_FILESYSTEM

The filesystem on the device

-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 which contains your user uid and gid. Don't be scared, it's just a matter of writing down 3 lines using your favourite editor.

USER_GID = gid
USER_UID = uid

WWW

git repository

AUTHOR

2011-2014 (C) The Lemon Man <thatlemon@gmail.com>