From 7b075f1b404d38b9659ebce45a4ba69c118a9fd9 Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 28 Nov 2006 16:27:59 +0000 Subject: [PATCH] Added symlinks to CA. --- lib/Simba/CA.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Simba/CA.pm b/lib/Simba/CA.pm index fc99b33..ae67a38 100644 --- a/lib/Simba/CA.pm +++ b/lib/Simba/CA.pm @@ -117,6 +117,11 @@ sub backup2disk { $d =~ s,//+,/,g; mkdir_p($d) or die "cannot mkdir $d: $!"; # XXX $self->setmeta($f); + } elsif ($f->{t} eq 'l') { + my $l = "$self->{this_backup}/$f->{name}"; + symlink($f->{lt}, $l) or die "cannot symlink $l -> $f->{lt}: $!"; # XXX + # $self->setmeta($f); ignore for symlinks. would need to use + # lchown, lchmod, etc. } else { # create local copy (or insert into DB only?) print STDERR "ignored $_\n"; @@ -141,6 +146,7 @@ sub parse { $f->{g} = unquote($f->{g}); $f->{acl} = unquote($f->{acl}); $f->{m} = $1 if $f->{m} =~ /^(\d+)$/; + $f->{lt} = unqote($f->{lt}) if defined $f->{lt}; return $f; }