Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

TO: traffic_ops postinstall issue #1386

Closed
kailuocisco opened this issue May 6, 2016 · 1 comment
Closed

TO: traffic_ops postinstall issue #1386

kailuocisco opened this issue May 6, 2016 · 1 comment

Comments

@kailuocisco
Copy link
Contributor

The following code is copied from "traffic_ops/install/bin/postinstall":

    # write whole config to temp file
    my $tmpfile = File::Temp->new();
    print $tmpfile $dumper->Dump();
    close $tmpfile;

    # rename current config file to something unique so it's not lost
    my $backup_num = 0;
    my $backup_name;
    do {
            $backup_num++;
            $backup_name = "$cdn_conf.backup$backup_num";
    } while ( -e $backup_name );
    rename( $cdn_conf, $backup_name ) or die("rename(): $!");

The rename() will fail if the directory "/tmp/" and the directory "traffic_ops/install/bin/" are not in the same disk partition.

The same issue will be found in the script "traffic_ops/install/bin/generateCert"

@kailuocisco kailuocisco changed the title traffic_ops postinstall issue TO: traffic_ops postinstall issue May 6, 2016
@elsloo elsloo added this to the 1.6.0 milestone May 6, 2016
@dangogh
Copy link
Contributor

dangogh commented May 10, 2016

good catch! I think File::Copy::move should handle that better..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants