umount all unused backup dirs, cd into the used backup dir
This commit is contained in:
parent
99f174bd0d
commit
d7446596d9
23
MYMETA.json
23
MYMETA.json
|
@ -4,7 +4,7 @@
|
|||
"unknown"
|
||||
],
|
||||
"dynamic_config" : 0,
|
||||
"generated_by" : "Module::Build version 0.38, CPAN::Meta::Converter version 2.110440",
|
||||
"generated_by" : "Module::Build version 0.421",
|
||||
"license" : [
|
||||
"perl_5"
|
||||
],
|
||||
|
@ -16,9 +16,9 @@
|
|||
"prereqs" : {
|
||||
"runtime" : {
|
||||
"requires" : {
|
||||
"Config::YAML" : 0,
|
||||
"Digest::SHA" : 0,
|
||||
"Readonly" : 0
|
||||
"Config::YAML" : "0",
|
||||
"Digest::SHA" : "0",
|
||||
"Readonly" : "0"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -28,24 +28,19 @@
|
|||
"version" : "0.002"
|
||||
},
|
||||
"Simba::Build" : {
|
||||
"file" : "lib/Simba/Build.pm",
|
||||
"version" : 0
|
||||
"file" : "lib/Simba/Build.pm"
|
||||
},
|
||||
"Simba::CA" : {
|
||||
"file" : "lib/Simba/CA.pm",
|
||||
"version" : 0
|
||||
"file" : "lib/Simba/CA.pm"
|
||||
},
|
||||
"Simba::CA::DBI" : {
|
||||
"file" : "lib/Simba/CA/DBI.pm",
|
||||
"version" : 0
|
||||
"file" : "lib/Simba/CA/DBI.pm"
|
||||
},
|
||||
"Simba::DA" : {
|
||||
"file" : "lib/Simba/DA.pm",
|
||||
"version" : 0
|
||||
"file" : "lib/Simba/DA.pm"
|
||||
},
|
||||
"Simba::Util" : {
|
||||
"file" : "lib/Simba/Util.pm",
|
||||
"version" : 0
|
||||
"file" : "lib/Simba/Util.pm"
|
||||
}
|
||||
},
|
||||
"release_status" : "stable",
|
||||
|
|
19
MYMETA.yml
19
MYMETA.yml
|
@ -4,35 +4,30 @@ author:
|
|||
- unknown
|
||||
build_requires: {}
|
||||
dynamic_config: 0
|
||||
generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.110440'
|
||||
generated_by: 'Module::Build version 0.421, CPAN::Meta::Converter version 2.142690'
|
||||
license: perl
|
||||
meta-spec:
|
||||
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
||||
version: 1.4
|
||||
version: '1.4'
|
||||
name: Simba
|
||||
provides:
|
||||
Simba:
|
||||
file: lib/Simba.pm
|
||||
version: 0.002
|
||||
version: '0.002'
|
||||
Simba::Build:
|
||||
file: lib/Simba/Build.pm
|
||||
version: 0
|
||||
Simba::CA:
|
||||
file: lib/Simba/CA.pm
|
||||
version: 0
|
||||
Simba::CA::DBI:
|
||||
file: lib/Simba/CA/DBI.pm
|
||||
version: 0
|
||||
Simba::DA:
|
||||
file: lib/Simba/DA.pm
|
||||
version: 0
|
||||
Simba::Util:
|
||||
file: lib/Simba/Util.pm
|
||||
version: 0
|
||||
requires:
|
||||
Config::YAML: 0
|
||||
Digest::SHA: 0
|
||||
Readonly: 0
|
||||
Config::YAML: '0'
|
||||
Digest::SHA: '0'
|
||||
Readonly: '0'
|
||||
resources:
|
||||
license: http://dev.perl.org/licenses/
|
||||
version: 0.002
|
||||
version: '0.002'
|
||||
|
|
|
@ -81,4 +81,19 @@ unless ($backup_dir) {
|
|||
}
|
||||
$ca->basedir($backup_dir);
|
||||
|
||||
# umount all potential backup dirs again, except the one we are actually
|
||||
# using
|
||||
for (@backup_dirs) {
|
||||
next if $_->[0] eq $backup_dir;
|
||||
$ca->log(0, "unmounting $_->[0]");
|
||||
system("/bin/umount", $_->[0]);
|
||||
}
|
||||
chdir($backup_dir); # prevent accidental umount
|
||||
|
||||
$ca->run();
|
||||
|
||||
# umount backup dir
|
||||
|
||||
chdir("/");
|
||||
$ca->log(0, "unmounting $backup_dir");
|
||||
system("/bin/umount", $backup_dir);
|
||||
|
|
Loading…
Reference in New Issue