19
19
# along with this program; if not, write to the Free Software
20
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
from __future__ import print_function
870
868
configdir, 'resume'), 'w') as configfile:
871
869
print("RESUME=%s" % resume, file=configfile)
873
osextras.unlink_force(self.target_file('etc/usplash.conf'))
874
871
osextras.unlink_force(self.target_file('etc/popularity-contest.conf'))
876
873
participate = self.db.get('popularity-contest/participate')
990
985
inst_boot = self.db.get('ubiquity/install_bootloader')
991
986
if inst_boot == 'true' and 'UBIQUITY_NO_BOOTLOADER' not in os.environ:
992
misc.execute('mount', '--bind', '/proc', self.target + '/proc')
993
misc.execute('mount', '--bind', '/sys', self.target + '/sys')
994
misc.execute('mount', '--bind', '/dev', self.target + '/dev')
987
binds = ("/proc", "/sys", "/dev", "/run")
989
misc.execute('mount', '--bind', bind, self.target + bind)
996
991
arch, subarch = install_misc.archdetect()
1043
1038
raise install_misc.InstallStepError(
1044
1039
"No bootloader installer found")
1046
misc.execute('umount', '-f', self.target + '/proc')
1047
misc.execute('umount', '-f', self.target + '/sys')
1048
misc.execute('umount', '-f', self.target + '/dev')
1042
misc.execute('umount', '-f', self.target + bind)
1050
1044
def do_remove(self, to_remove, recursive=False):
1051
1045
self.nested_progress_start()
1489
1483
if not os.path.exists(working):
1491
1485
install_misc.chroot_setup(self.target)
1486
binds = ("/proc", "/sys", "/dev", "/run")
1493
misc.execute('mount', '--bind', '/proc', self.target + '/proc')
1494
misc.execute('mount', '--bind', '/sys', self.target + '/sys')
1495
misc.execute('mount', '--bind', '/dev', self.target + '/dev')
1489
misc.execute('mount', '--bind', bind, self.target + bind)
1496
1490
subprocess.check_call(['apt-clone', 'restore-new-distro',
1497
1491
working, codename, '--destination', self.target],
1498
1492
preexec_fn=install_misc.debconf_disconnect)
1500
1494
install_misc.chroot_cleanup(self.target)
1501
misc.execute('umount', '-f', self.target + '/proc')
1502
misc.execute('umount', '-f', self.target + '/sys')
1503
misc.execute('umount', '-f', self.target + '/dev')
1496
misc.execute('umount', '-f', self.target + bind)
1505
1498
def copy_network_config(self):
1506
1499
if 'UBIQUITY_OEM_USER_CONFIG' in os.environ: