Cut the template of the network for initial appmenus retrieval

The user have no way to set anything before starting the template for
the first time. Especially firewall settings, netvm etc. So to not
expose the template to the outside world, disable networking there.
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-18 20:05:44 +01:00
parent c850ed3ca8
commit d246b84912

View File

@ -105,9 +105,13 @@ if [ "`stat -c %d:%i /`" != "`stat -c %d:%i /proc/1/root/.`" ]; then
qvm-template-commit --offline-mode %{template_name} qvm-template-commit --offline-mode %{template_name}
else else
qvm-template-commit %{template_name} qvm-template-commit %{template_name}
qvm-prefs -s %{template_name} netvm none
qvm-start --no-guid %{template_name} qvm-start --no-guid %{template_name}
qvm-sync-appmenus --force-root %{template_name} qvm-sync-appmenus --force-root %{template_name}
qvm-shutdown --wait %{template_name} qvm-shutdown --wait %{template_name}
qvm-prefs -s %{template_name} netvm default
# restore default firewall settings, which was reset by setting netvm=none
rm -f %{dest_dir}/firewall.xml
chgrp -R qubes %{dest_dir} chgrp -R qubes %{dest_dir}
chmod g+rwX -R %{dest_dir} chmod g+rwX -R %{dest_dir}
fi fi