master_passwd = []
- for line in self.g.cat('/etc/master.passwd').splitlines():
+ for line in self.image.g.cat('/etc/master.passwd').splitlines():
# Check for empty or comment lines
if len(line.split('#')[0]) == 0:
master_passwd.append(":".join(fields))
- self.g.write('/etc/master.passwd', "\n".join(master_passwd) + '\n')
+ self.image.g.write(
+ '/etc/master.passwd', "\n".join(master_passwd) + '\n')
# Make sure no one can login on the system
- self.g.rm_rf('/etc/spwd.db')
+ self.image.g.rm_rf('/etc/spwd.db')
def _do_collect_metadata(self):
"""Collect metadata about the OS"""
'^([^:]+):((?:![^:]+)|(?:[^!*][^:]+)|):(?:[^:]*:){7}(?:[^:]*)'
)
- for line in self.g.cat('/etc/master.passwd').splitlines():
+ for line in self.image.g.cat('/etc/master.passwd').splitlines():
line = line.split('#')[0]
match = regexp.match(line)
if not match:
group3 = int(match.group(3))
dev = '/dev/sd%c%d' % (chr(ord('a') + group2), group3)
try:
- self.g.mount_vfs(mopts, 'ufs', dev, mp)
+ self.image.g.mount_vfs(mopts, 'ufs', dev, mp)
except RuntimeError as msg:
if mp in critical_mpoints:
self.out.warn('unable to mount %s. Reason: %s' % (mp, msg))