summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <tails@boum.org>2014-06-15 16:52:38 +0000
committerTails developers <tails@boum.org>2014-06-15 16:52:38 +0000
commit05a6d6fb814809b61978966913c20bc2d7e822b9 (patch)
tree4cb71a74f72119c79b19904e25be9643d5284c81
parentcef02d01d79850d2e89a3f26c35bc4fb7b021b04 (diff)
parentac299ea4bc11ead4d8861ffb70666ca168eddc03 (diff)
Merge branch 'bugfix/7345-upgrade-from-iso-from-1.0-to-1.1' into debian_bugfix-7345-upgrade-from-iso-from-1.0-to-1.1
-rwxr-xr-xliveusb/creator.py5
-rwxr-xr-xliveusb/gui.py33
2 files changed, 10 insertions, 28 deletions
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 2f4e240..fb5b096 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -33,6 +33,7 @@ import signal
import time
import os
import re
+import stat
import sys
from StringIO import StringIO
@@ -963,9 +964,11 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
self.popen("extlinux -i '%s'" % syslinux_path)
else: # FAT
iso_syslinux = self.get_liveos_file_path('utils', 'linux', 'syslinux')
- tmpdir = tempfile.mkdtemp
+ tmpdir = tempfile.mkdtemp()
tmp_syslinux = os.path.join(tmpdir, 'syslinux')
shutil.copy(iso_syslinux, tmp_syslinux)
+ os.chmod(tmp_syslinux,
+ os.stat(tmp_syslinux).st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
self.flush_buffers()
self.unmount_device()
self.popen('%s %s -d %s %s' % (
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 180f0b6..d2f89f8 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -238,9 +238,8 @@ class LiveUSBThread(QtCore.QThread):
self.live.create_persistent_overlay()
self.live.update_configs()
- if self.parent.opts.partition:
- self.live.reset_mbr()
- else:
+ self.live.reset_mbr()
+ if not self.parent.opts.partition:
self.live.update_system_partition_properties()
self.live.install_bootloader()
# self.live.bootable_partition()
@@ -359,7 +358,6 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
self.connect_slots()
self.confirmed = False
self.delete_existing_liveos_confirmed = False
- self.mbr_reset_confirmed = False
# Intercept all liveusb INFO log messages, and display them in the gui
self.handler = LiveUSBLogHandler(lambda x: self.textEdit.append(x))
@@ -645,29 +643,10 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
for signal_match in self.signals_connected:
signal_match.remove()
- # Unmount the device and check the MBR
- if self.live.blank_mbr():
- if self.opts.partition:
- self.mbr_reset_confirmed = True
- if not self.mbr_reset_confirmed:
- self.status(_("The Master Boot Record on your device is blank. "
- "Pressing 'Install Tails' again will reset the "
- "MBR on this device."))
- self.mbr_reset_confirmed = True
- self.enable_widgets(True)
- return
- if self.live.drive['mount']:
- self.live.dest = self.live.drive['mount']
- self.live.unmount_device()
- self.live.reset_mbr()
- elif not self.live.mbr_matches_syslinux_bin():
- if self.opts.reset_mbr:
- self.live.reset_mbr()
- else:
- self.live.log.warn(_("Warning: The Master Boot Record on your device "
- "does not match your system's syslinux MBR. If you "
- "have trouble booting this stick, try running the "
- "liveusb-creator with the --reset-mbr option."))
+ # Unmount the device if needed
+ if self.live.drive['mount']:
+ self.live.dest = self.live.drive['mount']
+ self.live.unmount_device()
if not self.opts.partition:
try: