Improve test for presence of smbd (#754)

Will now work with nix / nixOS

Co-authored-by: omernaveedxyz <omernaveedxyz@users.noreply.github.com>
This commit is contained in:
Phil Clifford 2023-10-16 11:36:31 +01:00 committed by GitHub
parent 392e74c16b
commit 6eeb3db45c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -886,7 +886,7 @@ function vm_boot() {
fi
# If smbd is available and ~/Public is present export it to the guest via samba
if [[ -e "/usr/sbin/smbd" && -n ${PUBLIC} ]]; then
if [[ -x "$(command -v smbd)" && -n ${PUBLIC} ]]; then
NET="${NET},smb=${PUBLIC}"
echo " - smbd: On guest: smb://10.0.2.4/qemu"
fi