Merge remote-tracking branch 'qubesos/pr/27'

* qubesos/pr/27:
  Fix root.img handling bug
This commit is contained in:
Marek Marczykowski-Górecki 2017-06-07 10:09:03 +02:00
commit 005fed6cdf
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -205,7 +205,7 @@ if [ "x$PKGS" != "x" ]; then
dnf $YUM_OPTS $YUM_ACTION $PKGS ; RETCODE=$? dnf $YUM_OPTS $YUM_ACTION $PKGS ; RETCODE=$?
if [[ -n "$BAK_TEMPLATE_ROOT" ]] ; then # Handle template details if [[ -n "$BAK_TEMPLATE_ROOT" ]] ; then # Handle template details
if [ $RETCODE -eq 0 ] ; then if [[ $RETCODE -eq 0 && -f "$BAK_TEMPLATE_ROOT" ]]; then
# Reinstall went OK, remove backup files. # Reinstall went OK, remove backup files.
rm -f "$BAK_TEMPLATE_ROOT-bak" rm -f "$BAK_TEMPLATE_ROOT-bak"
rm -f "$BAK_TEMPLATE_PRIVATE-bak" rm -f "$BAK_TEMPLATE_PRIVATE-bak"
@ -214,13 +214,13 @@ if [ "x$PKGS" != "x" ]; then
mv "$BAK_TEMPLATE_ROOT-bak" "$BAK_TEMPLATE_ROOT" mv "$BAK_TEMPLATE_ROOT-bak" "$BAK_TEMPLATE_ROOT"
mv "$BAK_TEMPLATE_PRIVATE-bak" "$BAK_TEMPLATE_PRIVATE" mv "$BAK_TEMPLATE_PRIVATE-bak" "$BAK_TEMPLATE_PRIVATE"
fi fi
if [ -f "$TDIR/firewall.xml-bak" ]; then
mv "$TDIR/firewall.xml-bak" "$TDIR/firewall.xml"
fi
if ! qvm-prefs --force-root -s $TEMPLATE netvm $TEMPLATE_NETVM ; then if ! qvm-prefs --force-root -s $TEMPLATE netvm $TEMPLATE_NETVM ; then
echo "ERROR: NetVM setting could not be restored!" echo "ERROR: NetVM setting could not be restored!"
exit 1 exit 1
fi fi
if [ -f "$TDIR/firewall.xml-bak" ]; then
mv "$TDIR/firewall.xml-bak" "$TDIR/firewall.xml"
fi
fi fi
elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then