mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
nixos/libvirt: fix shellcheck findings with enableStrictShellChecks enabled (#349620)
This commit is contained in:
commit
681bc920f8
@ -426,9 +426,11 @@ in
|
|||||||
libvirt/qemu/networks/*.xml \
|
libvirt/qemu/networks/*.xml \
|
||||||
libvirt/nwfilter/*.xml );
|
libvirt/nwfilter/*.xml );
|
||||||
do
|
do
|
||||||
mkdir -p /var/lib/$(dirname $i) -m 755
|
# Intended behavior
|
||||||
if [ ! -e /var/lib/$i ]; then
|
# shellcheck disable=SC2174
|
||||||
cp -pd ${cfg.package}/var/lib/$i /var/lib/$i
|
mkdir -p "/var/lib/$(dirname "$i")" -m 755
|
||||||
|
if [ ! -e "/var/lib/$i" ]; then
|
||||||
|
cp -pd "${cfg.package}/var/lib/$i" "/var/lib/$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -440,9 +442,7 @@ in
|
|||||||
ln -s --force "$emulator" /run/${dirName}/nix-emulators/
|
ln -s --force "$emulator" /run/${dirName}/nix-emulators/
|
||||||
done
|
done
|
||||||
|
|
||||||
for helper in bin/qemu-pr-helper; do
|
ln -s --force ${cfg.qemu.package}/bin/qemu-pr-helper /run/${dirName}/nix-helpers/
|
||||||
ln -s --force ${cfg.qemu.package}/$helper /run/${dirName}/nix-helpers/
|
|
||||||
done
|
|
||||||
|
|
||||||
${optionalString cfg.qemu.ovmf.enable (let
|
${optionalString cfg.qemu.ovmf.enable (let
|
||||||
ovmfpackage = pkgs.buildEnv {
|
ovmfpackage = pkgs.buildEnv {
|
||||||
|
Loading…
Reference in New Issue
Block a user