Fix permissions on the dvm template directory.

Needed in case default_template-dvm VM was created in init
scripts, and files are not writeble by group qubes.
This commit is contained in:
Rafal Wojtczuk 2011-03-23 09:36:30 +01:00
parent 4e78284e4f
commit a814b522b9

View File

@ -28,8 +28,12 @@ if ! [ -d "/var/lib/qubes/vm-templates/$TEMPLATENAME" ] ; then
exit 1
fi
DVMTMPL="$TEMPLATENAME"-dvm
if ! [ -d "/var/lib/qubes/appvms/$DVMTMPL" ] ; then
DVMTMPLDIR="/var/lib/qubes/appvms/$DVMTMPL"
if ! [ -d "$DVMTMPLDIR" ] ; then
if ! qvm-create -t "$TEMPLATENAME" -l gray "$DVMTMPL" ; then exit 1 ; fi
chgrp qubes "$DVMTMPLDIR" "$DVMTMPLDIR"/*
chmod 660 "$DVMTMPLDIR"/*
chmod 770 "$DVMTMPLDIR"
fi
if ! /usr/lib/qubes/qubes_prepare_saved_domain.sh \
"$DVMTMPL" "/var/lib/qubes/appvms/$DVMTMPL/dvm-savefile" $SCRIPTNAME ; then