qvm-create-default-dvm: fix permissions after creating savefile

So, savefile.img and netvm_id.txt are correctly owned as well.
This commit is contained in:
Rafal Wojtczuk 2011-03-23 13:40:28 +01:00
parent a1f8cd9071
commit f9b9b1ade6

View File

@ -31,9 +31,6 @@ DVMTMPL="$TEMPLATENAME"-dvm
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
@ -57,3 +54,7 @@ else
chmod 660 $SHMCOPY
ln -s $SHMCOPY $CURRENT
fi
chgrp qubes "$DVMTMPLDIR" "$DVMTMPLDIR"/*
chmod 660 "$DVMTMPLDIR"/*
chmod 770 "$DVMTMPLDIR"