umount all user mounts on logout
This commit is contained in:
parent
67a9d1e6ef
commit
cc4010b1bb
6 changed files with 52 additions and 30 deletions
|
@ -108,7 +108,7 @@ fi
|
|||
## check, if we have to mount home
|
||||
#if ! findmnt "/media/${USER}/home"; then
|
||||
# echo "mounting home."
|
||||
sudo mounthome.sh
|
||||
sudo mounthome.sh &
|
||||
#fi
|
||||
|
||||
# because virsh has problems with long pathnames, using diffent configdir
|
||||
|
@ -124,9 +124,10 @@ if ! virsh --connect="${QEMU}" list | grep "${VM_NAME}-clone"; then
|
|||
virsh --connect=qemu:///session undefine "${VM_NAME}-clone" || echo "${VM_NAME}-clone did not exist"
|
||||
# finally, create the new vm
|
||||
virsh --connect=qemu:///session define "${VM_DIR}/${VM_NAME}-clone.xml"
|
||||
trap exit_script SIGHUP SIGINT SIGTERM
|
||||
#trap exit_script SIGHUP SIGINT SIGTERM
|
||||
[[ "${QEMU}" = 'qemu:///session' ]] && sudo /usr/local/bin/start-virtiofsd.sh "${VM_NAME}"
|
||||
virsh --connect="${QEMU}" start "${VM_NAME}-clone"
|
||||
fi
|
||||
echo "starting viewer"
|
||||
trap exit_script SIGHUP SIGINT SIGTERM
|
||||
virt-viewer --connect="${QEMU}" --full-screen "${VM_NAME}-clone"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue