Last change
on this file since 2393 was
2256,
checked in by nanardon, 5 years ago
|
Add attrbiute to add/remove user to autoFiltred group and aliases
|
File size:
996 bytes
|
Rev | Line | |
---|
[2083] | 1 | #!/usr/bin/perl |
---|
| 2 | |
---|
| 3 | use strict; |
---|
| 4 | use warnings; |
---|
| 5 | use LATMOS::Accounts; |
---|
| 6 | use Getopt::Long; |
---|
| 7 | use Pod::Usage; |
---|
| 8 | |
---|
| 9 | my $DATADIR = '@DATADIR@'; |
---|
| 10 | |
---|
| 11 | =head1 NAME |
---|
| 12 | |
---|
| 13 | la-sql-upgrade - Update SQL base schema |
---|
| 14 | |
---|
| 15 | =head1 SYNOPSIS |
---|
| 16 | |
---|
| 17 | la-sql-upgrade [options] [name] |
---|
| 18 | |
---|
| 19 | =cut |
---|
| 20 | |
---|
| 21 | GetOptions( |
---|
| 22 | 'c|config=s' => \my $config, |
---|
| 23 | 'b|base=s' => \my $base, |
---|
| 24 | 'no-commit' => \my $nocommit, |
---|
| 25 | 'v|verbose' => \my $verbose, |
---|
| 26 | 'h|help' => sub { pod2usage(1); }, |
---|
| 27 | ) or pod2usage(); |
---|
| 28 | |
---|
| 29 | =head1 OPTIONS |
---|
| 30 | |
---|
| 31 | =over 4 |
---|
| 32 | |
---|
| 33 | =item -c|--config configdir |
---|
| 34 | |
---|
| 35 | Use this configuration directory instead of the default one. |
---|
| 36 | |
---|
| 37 | =item -b|--base basename |
---|
| 38 | |
---|
| 39 | Query this specific base instead of the default one. |
---|
| 40 | |
---|
| 41 | =back |
---|
| 42 | |
---|
| 43 | =cut |
---|
| 44 | |
---|
| 45 | $| = 1; # autoflush |
---|
| 46 | |
---|
[2243] | 47 | if ($nocommit) { |
---|
| 48 | $ENV{LA_NO_COMMIT} = 1; |
---|
| 49 | } |
---|
| 50 | |
---|
[2083] | 51 | my $LA = LATMOS::Accounts->new($config, noacl => 1); |
---|
[2256] | 52 | |
---|
| 53 | $base ||= $LA->default_base_name; |
---|
| 54 | |
---|
[2243] | 55 | my $labase = $LA->_load_base($base); |
---|
[2083] | 56 | $labase->unexported(1); |
---|
| 57 | |
---|
| 58 | $labase->SchemaUpgrade() or die "An error occur"; |
---|
| 59 | |
---|
| 60 | print "Process terminated successfully\n"; |
---|
Note: See
TracBrowser
for help on using the repository browser.