Exemple #1
0
def read_output(window, probar):
    probar.set_text("Preparing partition")
    sleep(2)
    if os.path.exists(tmp + 'delete'):
        #new_val = probar.get_fraction() + 0.3
        probar.set_fraction(0.3)
        probar.set_text("Deleting partition")
        rDeleteParttion()
        sleep(5)
    # destroy disk partition and create scheme
    if os.path.exists(tmp + 'destroy'):
        #new_val = probar.get_fraction() + 0.3
        probar.set_fraction(0.3)
        probar.set_text("Creating new disk with partitions")
        destroyParttion()
        sleep(5)
    # create partition
    if os.path.exists(tmp + 'create'):
        #new_val = probar.get_fraction() + 0.4
        probar.set_fraction(0.4)
        probar.set_text("Creating new partitions")
        makingParttion()
        sleep(5)
    probar.set_text("Finish")
    probar.set_fraction(1.0)
    sleep(1)
    Popen(to_root, shell=True)
    gobject.idle_add(window.destroy)
Exemple #2
0
def read_output(window, probar):
    probar.set_text("Preparing partition")
    sleep(2)
    if os.path.exists(tmp + 'delete'):
        #new_val = probar.get_fraction() + 0.3
        probar.set_fraction(0.3)
        probar.set_text("Deleting partition")
        rDeleteParttion()
        sleep(5)
    # destroy disk partition and create scheme
    if os.path.exists(tmp + 'destroy'):
        #new_val = probar.get_fraction() + 0.3
        probar.set_fraction(0.3)
        probar.set_text("Creating new disk with partitions")
        destroyParttion()
        sleep(5)
    # create partition
    if os.path.exists(tmp + 'create'):
        #new_val = probar.get_fraction() + 0.4
        probar.set_fraction(0.4)
        probar.set_text("Creating new partitions")
        makingParttion()
        sleep(5)
    probar.set_text("Finish")
    probar.set_fraction(1.0)
    sleep(1)
    Popen(to_root, shell=True)
    gobject.idle_add(window.destroy)
Exemple #3
0
def read_output(command, window, probar):
    call('service hald stop', shell=True)
    # probar.set_text("Beginning installation")
    sleep(2)
    # probar.set_text("Creating partition table")
    sleep(2)
    if os.path.exists(tmp + 'delete'):
        # new_val = probar.get_fraction() + 0.001
        probar.set_fraction(0.002)
        # probar.set_text("Deleting partition")
        rDeleteParttion()
        sleep(5)
    # destroy disk partition and create scheme
    if os.path.exists(tmp + 'destroy'):
        # new_val = probar.get_fraction() + 0.001
        probar.set_fraction(0.004)
        # probar.set_text("Creating new disk with partitions")
        destroyParttion()
        sleep(5)
    # create partition
    if os.path.exists(tmp + 'create'):
        # new_val = probar.get_fraction() + 0.001
        probar.set_fraction(0.006)
        # probar.set_text("Creating new partitions")
        makingParttion()
        sleep(5)
    p = Popen(command,
              shell=True,
              stdin=PIPE,
              stdout=PIPE,
              stderr=STDOUT,
              close_fds=True)
    while 1:
        line = p.stdout.readline()
        if not line:
            break
        new_val = probar.get_fraction() + 0.000003
        probar.set_fraction(new_val)
        bartext = line
        probar.set_text("%s" % bartext.rstrip())
        ## Those for next 4 line is for debugin only.
        # filer = open("/home/ghostbsd/.gbi/tmp", "a")
        # filer.writelines(bartext)
        # filer.close
        print(bartext)
    probar.set_fraction(1.0)
    call('service hald start', shell=True)
    if bartext.rstrip() == "Installation finished!":
        call('python %send.py' % gbi_path, shell=True, close_fds=True)
        call("/home/ghostbsd/.gbi/", shell=True, close_fds=True)
        gobject.idle_add(window.destroy)
    else:
        call('python %serror.py' % gbi_path, shell=True, close_fds=True)
        gobject.idle_add(window.destroy)
Exemple #4
0
def read_output(command, probar):
    call('service hald stop', shell=True)
    GLib.idle_add(update_progess, probar, "Creating pcinstall.cfg")

    # If rc.conf.ghostbsd exists run gbsd_cfg
    if os.path.exists(rcconfgbsd):
        gbsd_cfg()
        call('umount /media/GhostBSD', shell=True)
    # If rc.conf.desktopbsd exists run dbsd_cfg
    elif os.path.exists(rcconfdbsd):
        dbsd_cfg()
        call('umount /media/DESKTOPBSD', shell=True)
    sleep(2)
    if os.path.exists(tmp + 'delete'):
        GLib.idle_add(update_progess, probar, "Deleting partition")
        rDeleteParttion()
        sleep(1)
    # destroy disk partition and create scheme
    if os.path.exists(tmp + 'destroy'):
        GLib.idle_add(update_progess, probar, "Creating disk partition")
        destroyParttion()
        sleep(1)
    # create partition
    if os.path.exists(tmp + 'create'):
        GLib.idle_add(update_progess, probar, "Creating new partitions")
        makingParttion()
        sleep(1)
    p = Popen(command,
              shell=True,
              stdin=PIPE,
              stdout=PIPE,
              stderr=STDOUT,
              close_fds=True)
    while True:
        line = p.stdout.readline()
        if not line:
            break
        bartext = line.rstrip()
        GLib.idle_add(update_progess, probar, bartext)
        # Those for next 4 line is for debugin only.
        # filer = open("/tmp/.gbi/tmp", "a")
        # filer.writelines(bartext)
        # filer.close
        print(bartext)
    call('service hald start', shell=True)
    if bartext.rstrip() == "Installation finished!":
        Popen('python2 %send.py' % gbi_path, shell=True, close_fds=True)
        call("rm -rf /tmp/.gbi/", shell=True, close_fds=True)
        Gtk.main_quit()
    else:
        Popen('python2 %serror.py' % gbi_path, shell=True, close_fds=True)
        Gtk.main_quit()
Exemple #5
0
def read_output(command, window, probar):
    call('service hald stop',shell=True)
    # probar.set_text("Beginning installation")
    sleep(2)
    # probar.set_text("Creating partition table")
    sleep(2)
    if os.path.exists(tmp + 'delete'):
        # new_val = probar.get_fraction() + 0.001
        probar.set_fraction(0.002)
        # probar.set_text("Deleting partition")
        rDeleteParttion()
        sleep(5)
    # destroy disk partition and create scheme
    if os.path.exists(tmp + 'destroy'):
        # new_val = probar.get_fraction() + 0.001
        probar.set_fraction(0.004)
        # probar.set_text("Creating new disk with partitions")
        destroyParttion()
        sleep(5)
    # create partition
    if os.path.exists(tmp + 'create'):
        # new_val = probar.get_fraction() + 0.001
        probar.set_fraction(0.006)
        # probar.set_text("Creating new partitions")
        makingParttion()
        sleep(5)
    p = Popen(command, shell=True, stdin=PIPE, stdout=PIPE,
              stderr=STDOUT, close_fds=True)
    while 1:
        line = p.stdout.readline()
        if not line:
            break
        new_val = probar.get_fraction() + 0.000003
        probar.set_fraction(new_val)
        bartext = line
        probar.set_text("%s" % bartext.rstrip())
        ## Those for next 4 line is for debugin only.
        # filer = open("/home/ghostbsd/.gbi/tmp", "a")
        # filer.writelines(bartext)
        # filer.close
        print(bartext)
    probar.set_fraction(1.0)
    call('service hald start',shell=True)
    if bartext.rstrip() == "Installation finished!":
        call('python %send.py' % gbi_path, shell=True, close_fds=True)
        call("/home/ghostbsd/.gbi/", shell=True, close_fds=True)
        gobject.idle_add(window.destroy)
    else:
        call('python %serror.py' % gbi_path, shell=True, close_fds=True)
        gobject.idle_add(window.destroy)
Exemple #6
0
def read_output(command, probar):
    call('service hald stop', shell=True)
    GLib.idle_add(update_progess, probar, "Creating pcinstall.cfg")

    # If rc.conf.ghostbsd exists run gbsd_cfg
    if os.path.exists(rcconfgbsd):
        gbsd_cfg()
        call('umount /media/GhostBSD', shell=True)
    # If rc.conf.desktopbsd exists run dbsd_cfg
    elif os.path.exists(rcconfdbsd):
        dbsd_cfg()
        call('umount /media/DESKTOPBSD', shell=True)
    sleep (2)
    if os.path.exists(tmp + 'delete'):
        GLib.idle_add(update_progess, probar, "Deleting partition")
        rDeleteParttion()
        sleep(1)
    # destroy disk partition and create scheme
    if os.path.exists(tmp + 'destroy'):
        GLib.idle_add(update_progess, probar, "Creating disk partition")
        destroyParttion()
        sleep(1)
    # create partition
    if os.path.exists(tmp + 'create'):
        GLib.idle_add(update_progess, probar, "Creating new partitions")
        makingParttion()
        sleep(1)
    p = Popen(command, shell=True, stdin=PIPE, stdout=PIPE,
              stderr=STDOUT, close_fds=True)
    while True:
        line = p.stdout.readline()
        if not line:
            break
        bartext = line.rstrip()
        GLib.idle_add(update_progess, probar, bartext)
        # Those for next 4 line is for debugin only.
        # filer = open("/tmp/.gbi/tmp", "a")
        # filer.writelines(bartext)
        # filer.close
        print(bartext)
    call('service hald start', shell=True)
    if bartext.rstrip() == "Installation finished!":
        Popen('python %send.py' % gbi_path, shell=True, close_fds=True)
        call("rm -rf /tmp/.gbi/", shell=True, close_fds=True)
        Gtk.main_quit()
    else:
        Popen('python %serror.py' % gbi_path, shell=True, close_fds=True)
        Gtk.main_quit()