Lines Matching defs:legacy

105     # This tag is used to determine if a legacy file was previously
451 # Methods that manipulate legacy files
455 """Modify/Return the name of the legacy file name."""
461 """Modify/Return the name of the legacy directory component."""
468 """Return the name of the full legacy pathname."""
472 """Was the legacy file generated from SMF data?"""
480 legacy = self.legacy_path() # What to look for
484 self.print_msg("No lofs mountpoint found (using legacy dir).")
494 if legacy == mnt: # lofs mount point match
503 """Return the name of the temp legacy pathname."""
509 """Create a new legacy temp file for writing."""
552 """Create a new legacy temp file for writing."""
596 """Save away an existing legacy file to ${legacy}.orig."""
597 legacy = self.legacy_path()
599 legacy = altpath
600 if os.path.exists(legacy): # Save away original
601 orig = '.'.join((legacy, 'orig'))
608 os.link(legacy, orig) # Avoid losing file temporarily
614 """Remove ${legacy}.orig if a legacy file exists."""
615 legacy = self.legacy_path()
617 legacy = altpath
618 if os.path.exists(legacy): # Save away original
619 orig = '.'.join((legacy, 'orig'))
620 if os.path.exists(orig): # ${legacy}.orig exists
629 """Attempt to remount the legacy file as a lofs mount point.
632 legacy = self.legacy_path()
635 self.print_msg(" Try legacy re-mount using lofs.")
636 if mntpath == legacy:
640 self.err_msg("Unable to archive existing legacy file.")
641 return False # Cannot save away existing legacy
642 self.print_msg(" Try to re-mount: ", mntpath, " to ", legacy)
652 umntcmd = self.LOFS_UMOUNT % legacy
667 mntcmd = self.LOFS_MOUNT % (mntpath, legacy)
679 self.print_msg(" Could not lofs re-mount legacy file.")
689 """Replace legacy config file with tmp config file.
690 Save away existing legacy file as necessary.
693 self.print_msg("Save new legacy file...")
694 legacy = self.legacy_path()
699 legdata = open(legacy, 'r').read()
715 # Otherwise copy temporary file to legacy file
717 self.err_msg("Unable to archive existing legacy file.")
718 return self.FAIL # Cannot save away existing legacy
719 self.print_msg(" Try legacy rename: ", tmppath, " to ", legacy)
721 os.rename(tmppath, legacy)
723 self.err_msg("Could not install legacy file.")
730 """Readlines an existing legacy file. Return a list of lines.
731 Return: None if no legacy file, [] if empty, or [...]
733 legacy = self.legacy_path()
736 lfd = open(legacy, 'r')
866 # Check to see if the existing legacy file was generated from SMF data.
870 """Was the legacy file generated from SMF data?"""
871 if self.legacy_exists(): # legacy file must first exist
886 if not self.legacy_exists(): # but with no legacy file
889 if self.is_autogenerated(): # OR legacy file must be