LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ninja Ubuntu Laptop Vanish: How Can I Remotely Undelete? (https://www.linuxquestions.org/questions/linux-newbie-8/ninja-ubuntu-laptop-vanish-how-can-i-remotely-undelete-905288/)

JoeyArnold 09-29-2011 01:44 AM

Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ sudo oem-config
[sudo] password for o:
o@o-HP-Compaq-6910p-GH715AW-ABA:~$


JoeyArnold 09-29-2011 01:45 AM

Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ locate OEM-Config
o@o-HP-Compaq-6910p-GH715AW-ABA:~$


snooly 09-29-2011 01:46 AM

Quote:

Originally Posted by JoeyArnold (Post 4485195)
OEM-Config
Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ ls oem-config
ls: cannot access oem-config: No such file or directory
o@o-HP-Compaq-6910p-GH715AW-ABA:~$ oem-config
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
Traceback (most recent call last):
  File "/usr/sbin/oem-config", line 573, in <module>
    main(oem_config)
  File "/usr/sbin/oem-config", line 505, in main
    version_file = open('/var/log/installer/version', 'w')
IOError: [Errno 13] Permission denied: '/var/log/installer/version'


Okay you found it, it's in /usr/sbin/oem-config. Please don't run it, just look at it.

ls -la /usr/sbin/oem-config

If it's less than a couple of thousand bytes long, I think it would be okay to post it.

JoeyArnold 09-29-2011 01:48 AM

after typing in
Code:

ls -laR / | less -i


I got this:
Code:


/:
total 120
drwxr-xr-x  22 root root  4096 2011-09-16 22:50 .
drwxr-xr-x  22 root root  4096 2011-09-16 22:50 ..
drwxr-xr-x  2 root root 12288 2011-09-28 23:35 bin
drwxr-xr-x  3 root root  4096 2011-09-28 23:36 boot
drwxr-xr-x  18 root root  4320 2011-09-28 23:21 dev
drwxr-xr-x 177 root root 12288 2011-09-28 23:36 etc
drwxr-xr-x  3 root root  4096 2011-08-27 02:24 home
lrwxrwxrwx  1 root root    33 2011-08-30 22:09 initrd.img -> boot/initrd.img-2.6.38-11-generic
lrwxrwxrwx  1 root root    33 2011-08-27 02:23 initrd.img.old -> boot/initrd.img-2.6.38-10-generic
drwxr-xr-x  20 root root 12288 2011-09-28 23:35 lib
drwx------  2 root root 16384 2011-04-15 12:34 lost+found
drwxr-xr-x  4 root root  4096 2011-09-28 20:18 media
drwxr-xr-x  2 root root  4096 2010-04-23 03:11 mnt
drwxr-xr-x  2 root root  4096 2011-04-15 12:35 opt
dr-xr-xr-x 173 root root    0 2011-09-28 23:20 proc
drwxr-xr--  3 root root  4096 2011-09-16 22:50 recovery
drwx------  16 root root  4096 2011-09-11 20:28 root
drwxr-xr-x  2 root root 12288 2011-09-28 23:35 sbin
drwxr-xr-x  2 root root  4096 2009-12-05 13:55 selinux
drwxr-xr-x  2 root root  4096 2011-04-15 12:35 srv
drwxr-xr-x  12 root root    0 2011-09-28 23:20 sys
drwxrwxrwt  12 root root  4096 2011-09-28 23:40 tmp
drwxr-xr-x  11 root root  4096 2011-05-01 00:36 usr
drwxr-xr-x  16 root root  4096 2011-05-12 17:42 var
lrwxrwxrwx  1 root root    30 2011-08-30 22:09 vmlinuz -> boot/vmlinuz-2.6.38-11-generic
lrwxrwxrwx  1 root root    30 2011-08-27 02:23 vmlinuz.old -> boot/vmlinuz-2.6.38-10-generic

/bin:
total 7012
drwxr-xr-x  2 root root  12288 2011-09-28 23:35 .
drwxr-xr-x 22 root root    4096 2011-09-16 22:50 ..
-rwxr-xr-x  1 root root    1091 2011-01-19 05:20 autopartition
:


JoeyArnold 09-29-2011 01:49 AM

Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ ls -la /usr/sbin/oem-config
lrwxrwxrwx 1 root root 28 2011-09-28 23:35 /usr/sbin/oem-config -> ../lib/ubiquity/bin/ubiquity
o@o-HP-Compaq-6910p-GH715AW-ABA:~$


snooly 09-29-2011 01:52 AM

Quote:

Originally Posted by JoeyArnold (Post 4485206)
Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ ls -la /usr/sbin/oem-config
lrwxrwxrwx 1 root root 28 2011-09-28 23:35 /usr/sbin/oem-config -> ../lib/ubiquity/bin/ubiquity
o@o-HP-Compaq-6910p-GH715AW-ABA:~$


So as you can see, oem-config is a symbolic link to /usr/lib/ubiquity/bin/ubiquity

How big is that file please? If it's not very big, you may as well post it. If it's text file of course, no point posting binaries.

JoeyArnold 09-29-2011 01:54 AM

Quote:

Originally Posted by snooly (Post 4485209)
So as you can see, oem-config is a symbolic link to /usr/lib/ubiquity/bin/ubiquity

How big is that file please? If it's not very big, you may as well post it. If it's text file of course, no point posting binaries.


Sorry but how do I post this OEM-Config file again?

JoeyArnold 09-29-2011 01:55 AM

Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ /usr/lib/ubiquity/bin/ubiquity
Traceback (most recent call last):
  File "/usr/lib/ubiquity/bin/ubiquity", line 573, in <module>
    main(oem_config)
  File "/usr/lib/ubiquity/bin/ubiquity", line 491, in main
    acquire_lock()
  File "/usr/lib/ubiquity/bin/ubiquity", line 372, in acquire_lock
    lock = open(LOCKFILE, 'w')
IOError: [Errno 13] Permission denied: '/var/lock/ubiquity'
o@o-HP-Compaq-6910p-GH715AW-ABA:~$


snooly 09-29-2011 01:57 AM

Quote:

Originally Posted by JoeyArnold (Post 4485212)
Sorry but how do I post this OEM-Config file again?

Joey please stop trying to run that file! You're in enough trouble already!

First check the size:

ls -la /usr/lib/ubiquity/bin/ubiquity

then you can use "cat" to see what is in it, obviously if it's thousands of pages long, nobody will sit there reading it. If it's a page or two, it might be interesting.

cat /usr/lib/ubiquity/bin/ubiquity

JoeyArnold 09-29-2011 02:05 AM

when i typed in

Code:

ls -laR / | less -i
I started scrolling through the pages of files.

The list includes dates.

Some of the dates are from before my laptop erased everything.

Some of these files may be my lost files. I just don't know yet.

Some of the files have generic names. Others have number or letter code names.

Do you think it would have a list of my lost data here somewhere?

JoeyArnold 09-29-2011 02:08 AM

Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ ls -la /usr/lib/ubiquity/bin/ubiquity
-rwxr-xr-x 1 root root 20257 2011-07-10 21:59 /usr/lib/ubiquity/bin/ubiquity
o@o-HP-Compaq-6910p-GH715AW-ABA:~$


JoeyArnold 09-29-2011 02:12 AM

When typing in the cat /usr/lib/ubiquity/bin/ubiquity

Code:

cat /usr/lib/ubiquity/bin/ubiquity




The following is probably more than two pages:

So you can skip it if you want then:


Code:

  if 'UBIQUITY_CTTY' not in os.environ:
        os.environ['UBIQUITY_CTTY'] = '1'

        import termios

        try:
            os.setsid()
        except OSError:
            pass

        ttyn = os.ttyname(0)
        tty = os.open(ttyn, os.O_RDWR | os.O_NONBLOCK)
        flags = fcntl.fcntl(tty, fcntl.F_GETFL)
        fcntl.fcntl(tty, fcntl.F_SETFL, flags)
        # Leave stderr alone in the following; it's already redirected to
        # our log file.
        for i in range(tty):
            if i != 2:
                os.close(i)
        for i in range(2):
            if tty != i:
                os.dup2(tty, i)
        if tty >= 3:
            os.close(tty)

        fcntl.ioctl(0, termios.TIOCSCTTY, 1)

    if 'UBIQUITY_BTERM' not in os.environ:
        os.environ['UBIQUITY_BTERM'] = '1'

        framebuffer = False
        dccomm = subprocess.Popen(['debconf-communicate',
                                  '-fnoninteractive', 'ubiquity'],
                                  stdin=subprocess.PIPE,
                                  stdout=subprocess.PIPE, close_fds=True)
        try:
            dc = debconf.Debconf(read=dccomm.stdout, write=dccomm.stdin)
            try:
                if dc.get('debian-installer/framebuffer') == 'true':
                    framebuffer = True
            except debconf.DebconfError:
                pass
        finally:
            dccomm.stdin.close()
            dccomm.wait()

        if framebuffer:
            def fb_has(substring):
                try:
                    fb = open('/proc/fb')
                except IOError:
                    return False
                try:
                    for line in fb:
                        if substring in line:
                            return True
                finally:
                    fb.close()
                return False

            got_fb = False
            if fb_has('VESA'):
                got_fb = True

            devnull = open('/dev/null', 'w')

            if not got_fb:
                subprocess.call(['modprobe', '-q', 'vesafb'],
                                stdout=devnull, stderr=devnull)
                if fb_has(''):
                    got_fb = True

            if not got_fb:
                subprocess.call(['modprobe', '-q', 'vga16fb'],
                                stdout=devnull, stderr=devnull)
                if fb_has(''):
                    got_fb = True

            if got_fb:
                if not os.path.isdir('/sys/class/graphics/fbcon'):
                    subprocess.call(['modprobe', '-q', 'fbcon'],
                                    stdout=devnull, stderr=devnull)

                # TODO: import debian-installer-utils and use update-dev?
                subprocess.call(['udevadm', 'settle'])

            devnull.close()

            if os.path.exists('/dev/fb0'):
                bterm_args = ['bterm',
                              '-f', '/usr/share/ubiquity/unifont.bgf', '--']
                bterm_args.extend(sys.argv)
                os.execvp('bterm', bterm_args)

def start_debconf():
    """debconf_ui needs to run within a debconf frontend."""

    if 'DEBIAN_HAS_FRONTEND' in os.environ:
        # debconf already started, so just clean up the configuration file
        # if any (debconf has already read it by now).
        if 'DEBCONF_SYSTEMRC' in os.environ:
            osextras.unlink_force(os.environ['DEBCONF_SYSTEMRC'])
        return

    print >>sys.stderr, "debconf_ui selected; starting debconf frontend"

    if 'DEBCONF_USE_CDEBCONF' not in os.environ:
        # This is rather unsatisfactory. Perhaps it would be better to
        # have a custom debconf program, a bit like dpkg-reconfigure.
        import tempfile
        debconfrc_fd, debconfrc = tempfile.mkstemp()
        os.chmod(debconfrc, 0644)
        debconfrc_file = os.fdopen(debconfrc_fd, 'w')
        orig_debconfrc = open('/etc/debconf.conf')
        state = 0
        for line in orig_debconfrc:
            if (state == 0 and
                line.rstrip('\n') and not line.startswith('#')):
                state = 1
            elif state == 1 and not line.rstrip('\n'):
                print >>debconfrc_file, 'Reshow: true'
                state = 2
            print >>debconfrc_file, line,
        orig_debconfrc.close()
        debconfrc_file.close()
        os.environ['DEBCONF_SYSTEMRC'] = debconfrc

        os.environ['DEBCONF_PACKAGE'] = 'ubiquity'
    else:
        os.environ['DEBCONF_SHOWOLD'] = 'true'
        # TODO: need to set owner somehow

    import debconf
    debconf.runFrontEnd() # re-execs this program

def install(frontend=None, query=False):
    '''install(frontend=None) -> none

    Get the type of frontend to use and load the module for that.
    If frontend is None, defaults to the first of
    gtk_ui, kde_ui, and debconf_ui that exists.
    '''
    if frontend is None:
        frontends = ['gtk_ui', 'kde_ui', 'debconf_ui']
    else:
        frontends = [frontend]
    chosen = None
    mod = __import__('ubiquity.frontend', globals(), locals(), frontends)
    for f in frontends:
        if hasattr(mod, f):
            chosen = f
            ui = getattr(mod, f)
            # Noninteractive implies automatic mode.
            if f == 'noninteractive':
                os.environ['UBIQUITY_AUTOMATIC'] = '1'
            # Migration Assistant does not support KDE.
            if f == 'kde_ui':
                if 'UBIQUITY_MIGRATION_ASSISTANT' in os.environ:
                    del os.environ['UBIQUITY_MIGRATION_ASSISTANT']
            break
    else:
        raise AttributeError('No frontend available; tried %s' %
                            ', '.join(frontends))
    os.environ['UBIQUITY_FRONTEND'] = chosen
    if query:
        print >> sys.__stdout__, os.environ['UBIQUITY_FRONTEND']
        sys.exit(0)

    unmount_target()
    distro = distribution().lower()
    wizard = ui.Wizard(distro)
    if os.environ['UBIQUITY_FRONTEND'] == 'debconf_ui':
        open_terminal()
        start_debconf()
    ret = wizard.run()
    wizard.stop_debconf()
    if ret != 10 and 'UBIQUITY_GREETER' in os.environ:
        import traceback
        try:
            apply_keyboard()
        except:
            traceback.print_exc()
    copy_debconf()
    unmount_target()
    if ret == 10:
        wizard.do_reboot()
    if ret == 11:
        wizard.do_shutdown()


@misc.raise_privileges
def apply_keyboard():
    '''Set the keyboard layout to the default layout for the language selected.
    If a user wants a different layout, they can be reasonably expected to
    change it in System -> Preferences -> Keyboard.'''
   
    # Mostly taken from ubi-console-setup.
   
    # We need to get rid of /etc/default/keyboard, or keyboard-configuration
    # will think it's already configured and behave differently. Try to save
    # the old file for interest's sake, but it's not a big deal if we can't.
    osextras.unlink_force('/etc/default/keyboard.pre-ubiquity')
    try:
        os.rename('/etc/default/keyboard',
                  '/etc/default/keyboard.pre-ubiquity')
    except OSError:
        osextras.unlink_force('/etc/default/keyboard')

    import debconf
    dccomm = subprocess.Popen(['debconf-communicate',
                              '-fnoninteractive', 'ubiquity'],
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE, close_fds=True)
    try:
        dc = debconf.Debconf(read=dccomm.stdout, write=dccomm.stdin)
        try:
            # Make sure debconf doesn't do anything with crazy "preseeded"
            # answers to these questions. If you want to preseed these, use the
            # *code variants.
            dc.fset('keyboard-configuration/layout', 'seen', 'false')
            dc.fset('keyboard-configuration/variant', 'seen', 'false')
            dc.fset('keyboard-configuration/model', 'seen', 'false')
            dc.fset('console-setup/codeset47', 'seen', 'false')
        except debconf.DebconfError:
            return
    finally:
        dccomm.stdin.close()
        dccomm.wait()
   
    # Accept all the defaults, given the preseeded language.
    child_env = dict(os.environ)
    child_env['OVERRIDE_ALLOW_PRESEEDING'] = '1'
    subprocess.call(['dpkg-reconfigure', '-fnoninteractive',
                    'keyboard-configuration'],
                    env=child_env)
    misc.execute('setupcon', '--save-only')
    # Reprocess /lib/udev/rules.d/64-xorg-xkb.rules
    misc.execute('udevadm', 'trigger', '--subsystem-match=input',
                '--action=change')
    misc.execute('udevadm', 'settle')

def copy_debconf():
    """Copy a few important questions into the installed system."""
    if not TARGET:
        return
    targetdb = TARGET + '/var/cache/debconf/config.dat'
    patterns = ['^oem-config/']
    oem = False

    import debconf
    dccomm = subprocess.Popen(['debconf-communicate',
                              '-fnoninteractive', 'ubiquity'],
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE, close_fds=True)
    try:
        dc = debconf.Debconf(read=dccomm.stdout, write=dccomm.stdin)
        try:
            if dc.get('oem-config/enable') == 'true':
                oem = True
        except debconf.DebconfError:
            pass
    finally:
        dccomm.stdin.close()
        dccomm.wait()

    if not oem:
        patterns.append('^keyboard-configuration/')
        patterns.append('^console-setup/')

    for q in patterns:
        misc.execute_root('debconf-copydb', 'configdb', 'targetdb', '-p', q,
                    '--config=Name:targetdb', '--config=Driver:File',
                    '--config=Mode:0644', '--config=Filename:%s' % targetdb)

def unmount_target():
    if not TARGET:
        return
    paths = []
    mounts = open('/proc/mounts')
    for line in mounts:
        path = line.split(' ')[1]
        if path == TARGET or path.startswith(TARGET + '/'):
            paths.append(path)
    mounts.close()
    paths.sort()
    paths.reverse()
    for path in paths:
        misc.execute_root('umount', path)

def prepend_path(directory):
    if 'PATH' in os.environ and os.environ['PATH'] != '':
        os.environ['PATH'] = '%s:%s' % (directory, os.environ['PATH'])
    else:
        os.environ['PATH'] = directory

def release_lock():
    global lock
    osextras.unlink_force(LOCKFILE)
    if lock is not None:
        lock.close()
        lock = None

def acquire_lock():
    global lock
    lock = open(LOCKFILE, 'w')
    try:
        fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
    except IOError, e:
        if e.errno in (errno.EACCES, errno.EAGAIN, errno.EWOULDBLOCK):
            print "Ubiquity is already running!"
            sys.exit(1)
        raise
    atexit.register(release_lock)
    fcntl.fcntl(lock, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
    print >>lock, os.getpid()
    lock.flush()
    os.fsync(lock.fileno())

    if 'DEBIAN_HAS_FRONTEND' not in os.environ:
        # Do a quick check to see if the debconf database is locked by
        # something else.
        test_debconf = subprocess.Popen(
            ['debconf-communicate', '-fnoninteractive', 'ubiquity'],
            stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
        try:
            print >>test_debconf.stdin, 'VERSION 2.0'
            test_debconf.stdout.readline()
        except IOError:
            pass
        test_debconf.stdin.close()
        if test_debconf.wait() != 0:
            print "Debconf database is locked!"
            print "This may be because a package management program is running."
            sys.exit(1)

def run_oem_hooks():
    """Run hook scripts from /usr/lib/oem-config/post-install."""

    hookdir = '/usr/lib/oem-config/post-install'

    if os.path.isdir(hookdir):
        # Exclude hooks containing '.', so that *.dpkg-* et al are avoided.
        hooks = filter(lambda entry: '.' not in entry, os.listdir(hookdir))
        child_env = dict(os.environ)
        child_env['DEBIAN_FRONTEND'] = 'noninteractive'
        if 'DEBIAN_HAS_FRONTEND' in child_env:
            del child_env['DEBIAN_HAS_FRONTEND']
        for hookentry in hooks:
            hook = os.path.join(hookdir, hookentry)
            if os.access(hook, os.X_OK):
                # Errors are ignored at present, although this may change.
                subprocess.call([hook], env=child_env)

def main(oem_config):
    usage = '%prog [options] [frontend]'
    parser = optparse.OptionParser(usage=usage, version=VERSION)
    parser.set_defaults(
        debug=('UBIQUITY_DEBUG' in os.environ),
        debug_pdb=False,
        cdebconf=False,
        automatic=False,
        query=False,
        migration_assistant=(not oem_config))
    parser.add_option('-d', '--debug', dest='debug', action='store_true',
                      help='debug mode (warning: passwords will be logged!)')
    parser.add_option('--pdb', dest='debug_pdb', action='store_true',
                      help='drop into Python debugger on a crash')
    parser.add_option('--cdebconf', dest='cdebconf', action='store_true',
                      help='use cdebconf instead of debconf (experimental)')
    if not oem_config:
        parser.add_option('--no-migration-assistant', dest='migration_assistant',
                          action='store_false',
                          help='disable Migration Assistant')
    parser.add_option('--automatic', dest='automatic', action='store_true',
                      help='do not ignore the "seen" flag (useful for ' \
                      'unattended installations).')
    parser.add_option('--only', dest='only', action='store_true',
                      help='tell the application that it is the only desktop ' \
                      'program running so that it can customize its UI to ' \
                      'better suit a minimal environment.')
    parser.add_option('-q', '--query', dest='query', action='store_true',
                      help='find out which frontend will be used by default')
    parser.add_option('-g', '--greeter', dest='greeter', action='store_true',
                      help='allow the user to leave the installer and enter ' \
                      'a live desktop (for the initial boot).')
    parser.add_option('-b', '--no-bootloader', dest='bootloader',
                      action='store_true',
                      help='Do not install a bootloader.')
    (options, args) = parser.parse_args()

    if options.debug:
        os.environ['UBIQUITY_DEBUG'] = '1'

    if options.debug_pdb:
        os.environ['UBIQUITY_DEBUG_PDB'] = '1'

    if options.cdebconf:
        # Note that this needs to be set before DebconfCommunicate is
        # imported by anything.
        os.environ['DEBCONF_USE_CDEBCONF'] = '1'
        prepend_path('/usr/lib/cdebconf')
    prepend_path('/usr/lib/ubiquity/compat')

    if options.automatic:
        os.environ['UBIQUITY_AUTOMATIC'] = '1'

    if options.migration_assistant:
        os.environ['UBIQUITY_MIGRATION_ASSISTANT'] = '1'

    if options.greeter:
        os.environ['UBIQUITY_GREETER'] = '1'

    if options.only:
        os.environ['UBIQUITY_ONLY'] = '1'

    if options.bootloader:
        os.environ['UBIQUITY_NO_BOOTLOADER'] = '1'

    if oem_config:
        os.environ['UBIQUITY_OEM_USER_CONFIG'] = '1'
        global TARGET
        TARGET = ''

    acquire_lock()

    try:
        os.makedirs('/var/log/installer')
    except OSError, e:
        # be happy if someone already created the path
        if e.errno != errno.EEXIST:
            raise
    syslog.openlog('ubiquity', syslog.LOG_NOWAIT | syslog.LOG_PID)

    if oem_config:
        syslog.syslog("Ubiquity %s (oem-config)" % VERSION)
    else:
        syslog.syslog("Ubiquity %s" % VERSION)
    version_file = open('/var/log/installer/version', 'w')
    print >>version_file, 'ubiquity %s' % VERSION
    version_file.close()

    if 'UBIQUITY_DEBUG' in os.environ:
        if 'UBIQUITY_DEBUG_CORE' not in os.environ:
            os.environ['UBIQUITY_DEBUG_CORE'] = '1'
        if 'DEBCONF_DEBUG' not in os.environ:
            os.environ['DEBCONF_DEBUG'] = 'developer'
    # The frontend should take care of displaying a helpful message if
    # we are being run without root privileges.
    if not (options.query and args and args[0] == 'noninteractive'):
        try:
            if oem_config:
                logfile = '/var/log/oem-config.log'
            else:
                logfile = '/var/log/installer/debug'
            log = os.open(logfile, os.O_WRONLY | os.O_CREAT | os.O_APPEND,
                          0644)
            os.dup2(log, 2)
            os.close(log)
            sys.stderr = os.fdopen(2, 'a', 1)
            if oem_config:
                print >>sys.stderr, "Ubiquity %s (oem-config)" % VERSION
            else:
                print >>sys.stderr, "Ubiquity %s" % VERSION
        except (IOError, OSError), err:
            if err.errno != errno.EACCES:
                raise

    # Default to enabling internal (non-debconf) debugging except for when
    # using --automatic.
    if 'UBIQUITY_DEBUG_CORE' not in os.environ:
        if options.automatic:
            os.environ['UBIQUITY_DEBUG_CORE'] = '1'

    # Initialise cdebconf if necessary, to work around
    # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451130.
    if options.cdebconf:
        for package in ('ubiquity', 'keyboard-configuration', 'console-setup'):
            subprocess.call(['debconf-loadtemplate', package,
                            '/var/lib/dpkg/info/%s.templates' % package])

    # Clean up old state.
    for name in ('apt-installed', 'apt-install-direct', 'remove-kernels', 'apt-removed'):
        osextras.unlink_force(os.path.join('/var/lib/ubiquity', name))
    shutil.rmtree("/var/lib/partman", ignore_errors=True)
    misc.remove_os_prober_cache()

    if oem_config and not options.query:
        disable_autologin()

    if args:
        install(args[0], query=options.query)
    else:
        install(query=options.query)

    if oem_config:
        run_oem_hooks()
    im_switch.kill_im()

if __name__ == '__main__':
    # Are we running as ubiquity or oem-config?
    oem_config = False
    script_name = os.path.basename(sys.argv[0])
    if script_name == 'oem-config':
        oem_config = True

    main(oem_config)

# vim:ai:et:sts=4:tw=80:sw=4:
o@o-HP-Compaq-6910p-GH715AW-ABA:~$


JoeyArnold 09-29-2011 02:18 AM

Lost and Found

Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ sudo cat /lost+found
cat: /lost+found: Is a directory


Nylex 09-29-2011 02:20 AM

You don't seem to be learning from what you've been doing. This would probably be good for you to read (particularly the first three parts).

JoeyArnold 09-29-2011 02:21 AM

Sudo ls block

Code:

o@o-HP-Compaq-6910p-GH715AW-ABA:~$ ls /dev/block
1:0  1:10  1:11  1:13  1:15  1:3  1:5  1:7  1:9  7:1  7:3  7:5  7:7  8:1  8:5
1:1  11:0  1:12  1:14  1:2  1:4  1:6  1:8  7:0  7:2  7:4  7:6  8:0  8:2



All times are GMT -5. The time now is 11:24 PM.