nixpkgs/upstart-jobs/lvm.nix
Eelco Dolstra 119df37858 * Generate a wrapper around modprobe that sets MODULE_DIR. This is
important for /proc/sys/kernel/modprobe, i.e., modprobing by the
  kernel.

svn path=/nixos/trunk/; revision=8164
2007-03-04 01:16:24 +00:00

30 lines
487 B
Nix

{modprobe, lvm2}:
{
name = "lvm";
job = "
start on udev
#start on new-devices
script
# Load the device mapper.
${modprobe}/sbin/modprobe dm_mod || true
# Scan for block devices that might contain LVM physical volumes
# and volume groups.
#${lvm2}/sbin/vgscan
# Make all logical volumes on all volume groups available, i.e.,
# make them appear in /dev.
${lvm2}/sbin/vgchange --available y
initctl emit new-devices
end script
";
}