[bug-notifications] [cswclassutils 0004543]: Configuration migration doesn't work properly if a directory is given

Mantis Bug Tracker noreply at opencsw.org
Fri Sep 3 16:32:29 CEST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://www.opencsw.org/mantis/view.php?id=4543 
====================================================================== 
Reported By:                yann
Assigned To:                
====================================================================== 
Project:                    cswclassutils
Issue ID:                   4543
Category:                   regular use
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2010-09-03 14:54 CEST
Last Modified:              2010-09-03 16:32 CEST
====================================================================== 
Summary:                    Configuration migration doesn't work properly if a
directory is given
Description: 
Hi,

According to the wiki page, cswclassutils cswmigrateconf class action
script can migrate a whole directory: "If a path specified in MIGRATE_FILES
is a directory, the whole directory tree is going to be copied." [1]

However I was not able to use this mode successfully with vsftpd. 
It seems that before doing the migration, the script always tries to test
the existence of /etc/opt/csw/vsftpd.CSW which is not applicable in the
directory case:

  # If there's a sample configuration file, remove the copied one.
  __sample_conf="${__dest_file_name}.CSW"
  if [ -r "${__sample_conf}" ]; then
    if files_are_identical "${__sample_conf}" "${__dest_file_name}"; then
      return "${__do_copy}"
    else
      return "${__do_not_copy}"
    fi
  fi


Have I done something wrong or is it a bug ?

Thanks in advance for your answer.

[1] http://wiki.opencsw.org/cswclassutils-package#toc15
====================================================================== 

---------------------------------------------------------------------- 
 (0008262) maciej (developer) - 2010-09-03 16:32
 https://www.opencsw.org/mantis/view.php?id=4543#c8262 
---------------------------------------------------------------------- 
You probably spotted a bug.  The directory case wasn't tested well.

What do you think would be a good fix?  Testing whether __dest_file_name
is a directory, and have a separate clause for it?



More information about the bug-notifications mailing list