1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
From: Werner Koch <wk@luthien.me.eunet.de>
To: Dirk Eddelbuettel <edd@qed.econ.queensu.ca>
Subject: Debian, Patch for AFIO
Date: Wed, 12 Mar 1997 20:34:36 +0100 (MET)
Status: O
Content-Length: 1221
Lines: 47
Hello Dirk,
To operate tob with afio and a remote tape the following patch is
very useable. It enables the syntax
[[<user>@]<host>:]<file_on_host>
the same way it is used by tar. This is not very well tested, but I'm
currently doing a backup on a remote tape with this afio.
Werner
diff -u afio-2.4.2/afio.c afio-2.4.2-dd9jn/afio.c
--- afio-2.4.2/afio.c Sun Jan 21 20:39:35 1996
+++ afio-2.4.2-dd9jn/afio.c Wed Mar 12 19:55:07 1997
@@ -416,15 +416,23 @@
arname = strcpy (arspec, av[optind++]);
if (colon = strchr (arspec, ':'))
- {
+ { char *host;
+
*colon++ = '\0';
if (equal = strchr (arspec, '='))
*equal++ = '\0';
+ if( host=strchr(arspec,'@') )
+ *host++ = 0;
VOID sprintf (arname = remote,
- "!rsh %s '%s -%c -b %u -c %u %s'",
- arspec, equal ? equal : myname,
+ "!rsh %s%s %s '%s -%c -b %u -c %u %s'",
+ host ? "-l ":"",
+ host ? arspec : "",
+ host ? host : arspec,
+ equal ? equal : myname,
isoutput ? 'O' : 'I', arbsize,
group, colon);
+ if( host )
+ *--host = '@';
if (equal)
*--equal = '=';
*--colon = ':';
--
Werner Koch, Duesseldorf - werner.koch@guug.de - PGP keyID: 0C9857A5
|