From: Russ Allbery Date: Fri, 26 Aug 2005 08:25:43 +0000 (+0000) Subject: Add a check to be sure the user has tokens, and add some whitespace to X-Git-Tag: debian/1.4rc1-1~3 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f33c8133aa89b9531b2131fb2a53c0bed6b64d26;p=packages%2Fo%2Fopenafs.git Add a check to be sure the user has tokens, and add some whitespace to help readability. --- diff --git a/debian/afs-rootvol b/debian/afs-rootvol index ce239a7ce..9a8da2f2e 100644 --- a/debian/afs-rootvol +++ b/debian/afs-rootvol @@ -31,6 +31,7 @@ root.afs. Sam Hartman =cut +#'# cperl-mode # This subroutine creates a volume, mounts it and then sets the access # to allow read by anyuser. The volume is scheduled for deletion in @@ -105,6 +106,14 @@ unless ($part) { $part = $rl->readline("What partition? [a] "); $part = "a" unless $part; } +print "\n"; + +# Make sure the user has tokens. Forgetting to do this is a common error. +my $status = system("tokens | grep Expires > /dev/null"); +if ($status != 0) { + die "You appear to not have AFS tokens. Obtain tokens (with aklog,\n" + . "for example) and then run this script again.\n"; +} # Figure out where root.afs is. There are two possibilities: either we aren't # running with dynroot, and root.afs is therefore accessible as /afs, or we