summaryrefslogtreecommitdiff
path: root/bin/mapsecrets2access_user
diff options
context:
space:
mode:
authorivan <ivan>2006-08-30 16:24:13 +0000
committerivan <ivan>2006-08-30 16:24:13 +0000
commite9643bdc9a6d493b4b8e02f7949885e6e126c43e (patch)
treef699530c59035fdcf23cd64b112deff44cacf95f /bin/mapsecrets2access_user
parent0815da7f25324df1040ba64c84ace44e49d7387c (diff)
need a username arg for now... this should make the error message less confusing
Diffstat (limited to 'bin/mapsecrets2access_user')
-rwxr-xr-xbin/mapsecrets2access_user8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/mapsecrets2access_user b/bin/mapsecrets2access_user
index 3fcd5069b..4efd90b2b 100755
--- a/bin/mapsecrets2access_user
+++ b/bin/mapsecrets2access_user
@@ -14,7 +14,8 @@ use FS::access_groupagent;
use FS::agent;
$FS::CurrentUser::upgrade_hack = 1;
-adminsuidsetup shift;
+my $user = shift or die &usage;
+adminsuidsetup $user;
my $supergroup = qsearchs('access_group', { 'groupname' => 'Superuser' } );
unless ( $supergroup ) {
@@ -77,3 +78,8 @@ cp $mapsecrets, "$mapsecrets.bak$$";
open(MAPSECRETS, ">$mapsecrets") or die $!;
print MAPSECRETS '* secrets'. "\n";
close MAPSECRETS or die $!;
+
+sub usage {
+ die "Usage:\n mapsecrets2access_user user\n";
+}
+