From f33c8133aa89b9531b2131fb2a53c0bed6b64d26 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 26 Aug 2005 08:25:43 +0000 Subject: [PATCH] Add a check to be sure the user has tokens, and add some whitespace to help readability. --- debian/afs-rootvol | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.39.5