~xubuntu-dev/ubiquity/lp1437180_feh

« back to all changes in this revision

Viewing changes to bin/ubiquity-dm

  • Committer: Kent Baxley
  • Date: 2012-07-10 15:21:55 UTC
  • mto: This revision was merged to the branch mainline in revision 5541.
  • Revision ID: kent.baxley@canonical.com-20120710152155-505tejn0fdvm7sca
Make final cleanups per Colin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
 
155
155
    def run_hooks(self, hookdir):
156
156
        if os.path.isdir(hookdir):
157
 
            hooks = [entry for entry in os.listdir(hookdir)]
 
157
            # Exclude hooks containing '.', so that *.dpkg-* et al are avoided. 
 
158
            hooks = [entry for entry in os.listdir(hookdir)
 
159
                     if '.' not in entry]
158
160
            for hookentry in hooks:
159
161
                hook = os.path.join(hookdir, hookentry)
160
162
                with open('/var/log/installer/dm', 'a') as logfile:
277
279
        
278
280
        # run simple, custom scripts during install time
279
281
        if program_basename == 'ubiquity':
280
 
            hookdir = '/usr/lib/ubiquity/dm-scripts/install'
281
 
            self.run_hooks(hookdir)
 
282
            self.run_hooks('/usr/lib/ubiquity/dm-scripts/install')
282
283
 
283
284
        # run simple, custom scripts during  oem-config
284
285
        if program_basename == 'oem-config-wrapper':
285
 
            hookdir = '/usr/lib/ubiquity/dm-scripts/oem'
286
 
            self.run_hooks(hookdir)
 
286
            self.run_hooks('/usr/lib/ubiquity/dm-scripts/oem')
287
287
 
288
288
        # Session bus, apparently needed by most interfaces now
289
289
        if ('DBUS_SESSION_BUS_ADDRESS' not in os.environ and
348
348
            # Accessibility infrastructure
349
349
            with open('/proc/cmdline', 'r') as fp:
350
350
                if (accessibility == True or 'maybe-ubiquity' in fp.readline() or
351
 
                    sys.argv[4:] == '/usr/sbin/oem-config-wrapper'):
 
351
                    program_basename == 'oem-config-wrapper'):
352
352
                    if os.path.exists('/usr/lib/at-spi2-core/at-spi-bus-launcher'):
353
353
                        extras.append(subprocess.Popen(
354
354
                            ['/usr/lib/at-spi2-core/at-spi-bus-launcher',