Vagrant/Libvirt basic test/dev environment
Signed-off-by: Cédric Clerget <cedric.clerget@gmail.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
f2869f4949
commit
0d041cbbbb
14
vagrant/export-libvirt-sock.sh
Executable file
14
vagrant/export-libvirt-sock.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
pidfile=".export-libvirt-sock.pid"
|
||||
|
||||
pid=$(cat $pidfile 2>/dev/null || true)
|
||||
|
||||
if [ "$pid" != "" ]; then
|
||||
if grep "/var/tmp/libvirt.sock:" /proc/$pid/cmdline >/dev/null 2>&1; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
nohup vagrant ssh wwctl -- -o ServerAliveInterval=5 -o ServerAliveCountMax=1 -f -R /var/tmp/libvirt.sock:/var/run/libvirt/libvirt-sock -N >/dev/null 2>&1 &
|
||||
echo $! > .export-libvirt-sock.pid
|
||||
Reference in New Issue
Block a user