
- Replace bind-mounts on /lmn/media/$USER with separate mounting for Home and Share SMB shares in the VM. - Update vm-run to start virtiofsd with /lmn/media/$USER (/home/$USER on localhome machines). - Use vm-vminfo to generate a JSON file containing user information, including Username, Groups, printer list krb5-ticket and some more - Configure vminfo.service (systemd-timer) to periodically call vm-vminfo. - Ensure krb5-ticket (TGT) is injected into the Windows VM. - Mount SMB-Home and SMB-Share shares as part of the new structure.
29 lines
581 B
Bash
Executable file
29 lines
581 B
Bash
Executable file
#!/usr/bin/bash
|
|
# link VM in User-Dir in /tmp or /var/vm
|
|
|
|
set -eu
|
|
|
|
source /etc/lmn/vm.conf
|
|
|
|
# change to image-directory
|
|
cd "${VM_SYSDIR}"
|
|
|
|
while getopts ':p' OPTION; do
|
|
case "$OPTION" in
|
|
p)
|
|
VM_DIR="${VM_DIR_PERSISTENT}"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
shift "$((OPTIND -1))"
|
|
|
|
# link system-VM-Images to User VM Directory
|
|
for filename in "$@"; do
|
|
filename="$(basename ${filename})"
|
|
[[ -f "${VM_DIR}/${filename}" ]] || ln "${filename}" "${VM_DIR}/${filename}"
|
|
done
|
|
|
|
# allow lmnsynci to remove old vm images
|
|
chgrp lmnsynci "${VM_DIR}"
|
|
chmod g+w "${VM_DIR}"
|