log mounts
This commit is contained in:
parent
58b8ab7403
commit
fe23839aaf
|
@ -33,11 +33,13 @@ my $base_device = $st->dev;
|
|||
for (glob("/backup/*")) {
|
||||
my $st = stat($_);
|
||||
my $dir_device = $st->dev;
|
||||
$ca->log(0, "checking $_");
|
||||
if ($base_device == $dir_device) {
|
||||
# not a mount point
|
||||
(my $basedir = $_) =~ s{^/backup/}{};
|
||||
if (-e "/dev/disk/by-id/$basedir") {
|
||||
# matching device exists
|
||||
$ca->log(0, "mounting /dev/disk/by-id/$basedir on $_");
|
||||
system("/bin/mount", "-o", "nodev,noexec,nomand,nosuid", "/dev/disk/by-id/$basedir", $_);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue