Merge pull request #42643 from ajs124/libvirt_iscsi

libvirt: fix iscsi storage support
This commit is contained in:
Matthew Bauer 2018-06-28 22:26:36 -04:00 committed by GitHub
commit 1c0b6ebe2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,10 @@ in stdenv.mkDerivation rec {
"sysconfdir=$(out)/var/lib"
];
postInstall = ''
postInstall = let
binPath = [ iptables iproute pmutils numad numactl bridge-utils dmidecode dnsmasq ebtables ] ++ optionals enableIscsi [ openiscsi ];
in ''
substituteInPlace $out/libexec/libvirt-guests.sh \
--replace 'ON_SHUTDOWN=suspend' 'ON_SHUTDOWN=''${ON_SHUTDOWN:-suspend}' \
--replace "$out/bin" '${gettext}/bin' \
@ -106,7 +109,7 @@ in stdenv.mkDerivation rec {
substituteInPlace $out/lib/systemd/system/libvirtd.service --replace /bin/kill ${coreutils}/bin/kill
rm $out/lib/systemd/system/{virtlockd,virtlogd}.*
wrapProgram $out/sbin/libvirtd \
--prefix PATH : /run/libvirt/nix-emulators:${makeBinPath [ iptables iproute pmutils numad numactl bridge-utils dmidecode dnsmasq ebtables ]}
--prefix PATH : /run/libvirt/nix-emulators:${makeBinPath binPath}
'';
enableParallelBuilding = true;