* devicemapper -> lvm2.
svn path=/nixos/trunk/; revision=19294
This commit is contained in:
parent
9a0789a81e
commit
0595b7f89d
|
@ -115,7 +115,6 @@ let
|
||||||
# work.
|
# work.
|
||||||
extraUtils = pkgs.runCommand "extra-utils"
|
extraUtils = pkgs.runCommand "extra-utils"
|
||||||
{ buildInputs = [pkgs.nukeReferences];
|
{ buildInputs = [pkgs.nukeReferences];
|
||||||
devicemapper = if config.boot.initrd.lvm then pkgs.devicemapper else null;
|
|
||||||
lvm2 = if config.boot.initrd.lvm then pkgs.lvm2 else null;
|
lvm2 = if config.boot.initrd.lvm then pkgs.lvm2 else null;
|
||||||
allowedReferences = [ "out" modulesClosure ]; # prevent accidents like glibc being included in the initrd
|
allowedReferences = [ "out" modulesClosure ]; # prevent accidents like glibc being included in the initrd
|
||||||
doublePatchelf = (pkgs.stdenv.system == "armv5tel-linux");
|
doublePatchelf = (pkgs.stdenv.system == "armv5tel-linux");
|
||||||
|
@ -153,11 +152,11 @@ let
|
||||||
|
|
||||||
cp -pd ${pkgs.e2fsprogs}/lib/lib*.so.* $out/lib
|
cp -pd ${pkgs.e2fsprogs}/lib/lib*.so.* $out/lib
|
||||||
|
|
||||||
# Copy devicemapper and lvm, if we need it.
|
# Copy dmsetup and lvm, if we need it.
|
||||||
if test -n "$devicemapper"; then
|
if test -n "$lvm2"; then
|
||||||
cp $devicemapper/sbin/dmsetup $out/bin/dmsetup
|
cp $lvm2/sbin/dmsetup $out/bin/dmsetup
|
||||||
cp $devicemapper/lib/libdevmapper.so.*.* $out/lib
|
|
||||||
cp $lvm2/sbin/lvm $out/bin/lvm
|
cp $lvm2/sbin/lvm $out/bin/lvm
|
||||||
|
cp $lvm2/lib/libdevmapper.so.*.* $out/lib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add RAID mdadm tool.
|
# Add RAID mdadm tool.
|
||||||
|
@ -208,8 +207,8 @@ let
|
||||||
$out/bin/fsck -N
|
$out/bin/fsck -N
|
||||||
$out/bin/udevadm --version
|
$out/bin/udevadm --version
|
||||||
$out/bin/blkid -v 2>&1 | grep "blkid from util-linux-ng"
|
$out/bin/blkid -v 2>&1 | grep "blkid from util-linux-ng"
|
||||||
if test -n "$devicemapper"; then
|
if test -n "$lvm2"; then
|
||||||
$out/bin/dmsetup --version | grep "version:"
|
$out/bin/dmsetup --version 2>&1 | grep "version:"
|
||||||
LVM_SYSTEM_DIR=$out $out/bin/lvm 2>&1 | grep "LVM"
|
LVM_SYSTEM_DIR=$out $out/bin/lvm 2>&1 | grep "LVM"
|
||||||
fi
|
fi
|
||||||
$out/bin/reiserfsck -V
|
$out/bin/reiserfsck -V
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# Load the device mapper.
|
# Load the device mapper.
|
||||||
${config.system.sbin.modprobe}/sbin/modprobe dm_mod || true
|
${config.system.sbin.modprobe}/sbin/modprobe dm_mod || true
|
||||||
|
|
||||||
${pkgs.devicemapper}/sbin/dmsetup mknodes
|
${pkgs.lvm2}/sbin/dmsetup mknodes
|
||||||
|
|
||||||
# Scan for block devices that might contain LVM physical volumes
|
# Scan for block devices that might contain LVM physical volumes
|
||||||
# and volume groups.
|
# and volume groups.
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
task = true;
|
task = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.devicemapper pkgs.lvm2 ];
|
environment.systemPackages = [ pkgs.lvm2 ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue