mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +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/nwfilter/*.xml );
|
||||
do
|
||||
mkdir -p /var/lib/$(dirname $i) -m 755
|
||||
if [ ! -e /var/lib/$i ]; then
|
||||
cp -pd ${cfg.package}/var/lib/$i /var/lib/$i
|
||||
# Intended behavior
|
||||
# shellcheck disable=SC2174
|
||||
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
|
||||
done
|
||||
|
||||
@ -440,9 +442,7 @@ in
|
||||
ln -s --force "$emulator" /run/${dirName}/nix-emulators/
|
||||
done
|
||||
|
||||
for helper in bin/qemu-pr-helper; do
|
||||
ln -s --force ${cfg.qemu.package}/$helper /run/${dirName}/nix-helpers/
|
||||
done
|
||||
ln -s --force ${cfg.qemu.package}/bin/qemu-pr-helper /run/${dirName}/nix-helpers/
|
||||
|
||||
${optionalString cfg.qemu.ovmf.enable (let
|
||||
ovmfpackage = pkgs.buildEnv {
|
||||
|
Loading…
Reference in New Issue
Block a user