- Fixed rsync is case of shareName = '/'
authorcbarratt <cbarratt>
Fri, 7 Feb 2003 05:50:20 +0000 (05:50 +0000)
committercbarratt <cbarratt>
Fri, 7 Feb 2003 05:50:20 +0000 (05:50 +0000)
 - Repaired host name regex to correctly allow '-' in host name
 - Added sshPath to Pre/Post command vars
 - Ensured child exited after failed exec for Pre/Post commands
 - Added space before $I_option in Smb.
 - Made $I_option a listref, rather than string, for Smb

bin/BackupPC_dump
bin/BackupPC_link
bin/BackupPC_restore
bin/BackupPC_tarCreate
bin/BackupPC_tarExtract
bin/BackupPC_zipCreate
conf/config.pl

index 0b46c90..bc09e4e 100755 (executable)
@@ -102,7 +102,7 @@ if ( @ARGV != 1 ) {
     print("usage: $0 [-d] [-e] [-f] [-i] <client>\n");
     exit(1);
 }
-if ( $ARGV[0] !~ /^([\w\.-\s]+)$/ ) {
+if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) {
     print("$0: bad client name '$ARGV[0]'\n");
     exit(1);
 }
@@ -121,7 +121,7 @@ if ( $opts{d} ) {
     $hostIP = $client;
     exit(1) if ( $bpc->CheckHostAlive($hostIP) < 0 );
     ($client, $user) = $bpc->NetBiosInfoGet($hostIP);
-    exit(1) if ( $host !~ /^([\w\.-]+)$/ );
+    exit(1) if ( $host !~ /^([\w\.\s-]+)$/ );
     my $hosts = $bpc->HostInfoRead($client);
     exit(1) if ( !defined($hosts->{$client}) );
     $host = $client;
@@ -913,6 +913,7 @@ sub UserCommandRun
         share   => $ShareNames->[0],
         shares  => $ShareNames,
         XferMethod => $Conf{XferMethod},
+        sshPath => $Conf{SshPath},
         LOG     => *LOG,
         XferLOG => $XferLOG,
         stat    => \%stat,
index 8bd8dc1..fa014e7 100755 (executable)
@@ -70,7 +70,7 @@ if ( @ARGV != 1 ) {
     print("usage: $0 <host>\n");
     exit(1);
 }
-if ( $ARGV[0] !~ /^([\w\.-\s]+)$/ ) {
+if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) {
     print("$0: bad host name '$ARGV[0]'\n");
     exit(1);
 }
index 7746a36..18e5700 100755 (executable)
@@ -565,6 +565,7 @@ sub UserCommandRun
         hostIP       => $hostIP,
         share        => $RestoreReq{shareDest},
         XferMethod   => $Conf{XferMethod},
+        sshPath      => $Conf{SshPath},
         LOG          => *LOG,
         XferLOG      => $RestoreLOG,
         stat         => \%stat,
index 3ba3bbc..2fb6459 100755 (executable)
@@ -78,7 +78,7 @@ if ( @ARGV < 1 ) {
     exit(1);
 }
 
-if ( $opts{h} !~ /^([\w\.-\s]+)$/ ) {
+if ( $opts{h} !~ /^([\w\.\s-]+)$/ ) {
     print(STDERR "$0: bad host name '$opts{h}'\n");
     exit(1);
 }
index 7f53915..fc5dfa5 100755 (executable)
@@ -50,7 +50,7 @@ if ( @ARGV != 3 ) {
     print("usage: $0 <host> <shareName> <compressLevel>\n");
     exit(1);
 }
-if ( $ARGV[0] !~ /^([\w\.-\s]+)$/ ) {
+if ( $ARGV[0] !~ /^([\w\.\s-]+)$/ ) {
     print("$0: bad host name '$ARGV[0]'\n");
     exit(1);
 }
index c91d208..ac0c237 100755 (executable)
@@ -84,7 +84,7 @@ if ( @ARGV < 1 ) {
     exit(1);
 }
 
-if ( $opts{h} !~ /^([\w\.-]+)$/ ) {
+if ( $opts{h} !~ /^([\w\.\s-]+)$/ ) {
     print(STDERR "$0: bad host name '$opts{h}'\n");
     exit(1);
 }
index 6d81255..679908e 100644 (file)
@@ -547,15 +547,15 @@ $Conf{SmbClientPath} = '/usr/bin/smbclient';
 #    $timeStampFile   start time for incremental dump
 #
 $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName'
-           . '$I_option -U $userName -E -N -d 1'
+           . ' $I_option -U $userName -E -N -d 1'
             . ' -c tarmode\\ full -Tc$X_option - $fileList';
 
 $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName'
-           . '$I_option -U $userName -E -N -d 1'
+           . ' $I_option -U $userName -E -N -d 1'
            . ' -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
 
 $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName'
-            . '$I_option -U $userName -E -N -d 1'
+            . ' $I_option -U $userName -E -N -d 1'
             . ' -c tarmode\\ full -Tx -';
 
 #
@@ -957,6 +957,8 @@ $Conf{RestorePostUserCmd} = undef;
 # to all refer to the same physical hosts.  This should only be
 # set in the per-PC config file.
 #
+# Note: this setting doesn't work for DHCP hosts.
+#
 $Conf{ClientNameAlias} = undef;
 
 #