parameters: (root_mount_point)
return_statement: return os.path.join(default_dir, default_config_file)
docstring: Figures out where to put the grub config files. Returns
      a the full path of a file inside that
      directory, as "the config file".
  
      Returns a path into @p root_mount_point.
docstring_summary: Figures out where to put the grub config files. Returns
      a the full path of a file inside that
      directory, as "the config file".
docstring_tokens: Figures out where to put the grub config files . Returns a the full path of a file inside that directory as the config file .
function: def get_grub_config_path(root_mount_point):
      """
      Figures out where to put the grub config files. Returns
      a the full path of a file inside that
      directory, as "the config file".
  
      Returns a path into @p root_mount_point.
      """
      default_dir = os.path.join(root_mount_point, "etc/default")
      default_config_file = "grub"
  
      if "prefer_grub_d" in libcalamares.job.configuration and libcalamares.job.configuration["prefer_grub_d"]:
          possible_dir = os.path.join(root_mount_point, "etc/default/grub.d")
          if os.path.exists(possible_dir) and os.path.isdir(possible_dir):
              default_dir = possible_dir
              default_config_file = "00calamares"
  
      if not os.path.exists(default_dir):
          try:
              os.mkdir(default_dir)
          except:
              libcalamares.utils.debug("Failed to create '%r'" % default_dir)
              raise
  
      return os.path.join(default_dir, default_config_file)
function_tokens: def get_grub_config_path ( root_mount_point ) : default_dir = os . path . join ( root_mount_point , "etc/default" ) default_config_file = "grub" if "prefer_grub_d" in libcalamares . job . configuration and libcalamares . job . configuration [ "prefer_grub_d" ] : possible_dir = os . path . join ( root_mount_point , "etc/default/grub.d" ) if os . path . exists ( possible_dir ) and os . path . isdir ( possible_dir ) : default_dir = possible_dir default_config_file = "00calamares" if not os . path . exists ( default_dir ) : try : os . mkdir ( default_dir ) except : libcalamares . utils . debug ( "Failed to create '%r'" % default_dir ) raise return os . path . join ( default_dir , default_config_file )