From: Michel G. <mic...@7i...> - 2005-02-01 08:03:22
|
Hello all, I encountered the same problem. Hope the following patch to flexbackup script solve your problem. Not widely tested, maybe the bad way to do it, but it works on freebsd flexbackup server with freebsd (using freebsd find) and solaris clients (using gnu find). So it will works probably in your environnement. --- /usr/local/bin/flexbackup.orig Sat Jan 29 19:29:49 2005 +++ /usr/local/bin/flexbackup Sun Jan 30 12:10:40 2005 @@ -780,6 +780,9 @@ close(LIST); } } + + # Check remote system's uname + &check_uname($remote); &log("| Backup of: $dir"); my $remove = ''; @@ -5413,6 +5416,34 @@ } else { print $::msg "$::shelltype{$host}\n"; } + +} + +# Check (remote) uname to use find with -E (FreeBSD) or not + +sub check_uname { + my $host = shift(@_); + my $pipecmd; + + $pipecmd = "uname -s"; + if ($host eq 'localhost') { + print $::msg "| Checking uname on this machine... "; + } else { + print $::msg "| Checking uname on $host... "; + $pipecmd = "$::remoteshell $host '" . $pipecmd . "'"; + } + if (!(open(PIPE,"$pipecmd 2>&1 |"))) { + return; + } + + while (<PIPE>) { + if (m/^(\S+)/) { + my $uname = $1; + $::uname = $uname; + print $::msg "$uname\n"; + } + } + close (PIPE); } Regards, Michel Gravey |