summaryrefslogtreecommitdiffstats
path: root/sbin/dump/dumprmt.c
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-11-18 18:00:43 +0000
committerjoerg <joerg@FreeBSD.org>1995-11-18 18:00:43 +0000
commit23c0dfac90b2ba18799e6bd7ba89e47bc9521800 (patch)
tree1ee3c2b171fd54126862370e801a7a1a6cc7091e /sbin/dump/dumprmt.c
parent39bf0372f9f49e45f2a318ed51c8f74beae187a8 (diff)
downloadFreeBSD-src-23c0dfac90b2ba18799e6bd7ba89e47bc9521800.zip
FreeBSD-src-23c0dfac90b2ba18799e6bd7ba89e47bc9521800.tar.gz
Andreas Klemm's patch set for dump(8), with some minor (cosmetic)
changes and one addition by me. . Use reasonable defaults for the tape drive (/dev/rst0) instead of something we actually don't have. . Add a summary line displaying the alapsed time and the total throughput. . Replace "rmt" for the remote location of rmt(8) by "/etc/rmt", since this is the historical protocol, and relying on the $PATH causes a big pain. Make it adjustable via an environmental variable though. Reviewed by: joerg (for Andreas' part) Submitted by: andreas@knobel.gun.de (Andreas Klemm)
Diffstat (limited to 'sbin/dump/dumprmt.c')
-rw-r--r--sbin/dump/dumprmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c
index 22acbfd..48d07d4 100644
--- a/sbin/dump/dumprmt.c
+++ b/sbin/dump/dumprmt.c
@@ -113,6 +113,7 @@ void
rmtgetconn()
{
register char *cp;
+ register const char *rmt;
static struct servent *sp = NULL;
static struct passwd *pwd = NULL;
#ifdef notdef
@@ -143,8 +144,10 @@ rmtgetconn()
rmtpeer = ++cp;
} else
tuser = pwd->pw_name;
+ if ((rmt = getenv("RMT")) == NULL)
+ rmt = _PATH_RMT;
rmtape = rcmd(&rmtpeer, (u_short)sp->s_port, pwd->pw_name, tuser,
- _PATH_RMT, (int *)0);
+ rmt, (int *)0);
size = ntrec * TP_BSIZE;
if (size > 60 * 1024) /* XXX */
size = 60 * 1024;
OpenPOWER on IntegriCloud