TT#190250 Rename ngcp-sync-* commands to clarify their purpose

These commands are db-specific, and the constants one involves the
database credentials, so give both better names to make it clear these
are not general purpose commands.

Preserve backwards compatibility symlinks for external callers, or
user muscle memory, which this gets migrated away.

Change-Id: I3baae364e786ebbdc9e386dfc4f8c0bf54333cd1
mr11.2
Guillem Jover 3 years ago
parent 7bfc0e3892
commit 3b3baae3c0

@ -15,8 +15,8 @@ PERL_SCRIPTS = \
sbin/ngcp-instances-validator \
sbin/ngcp-network \
sbin/ngcp-network-validator \
sbin/ngcp-sync-constants \
sbin/ngcp-sync-grants \
sbin/ngcp-sync-db-creds \
sbin/ngcp-sync-db-grants \
# EOL
YAML_SCHEMAS = \
schemas/instances.yml \
@ -32,8 +32,8 @@ man:
asciidoctor -d manpage -b manpage docs/ngcpcfg.txt
pod2man --section=8 sbin/ngcp-network > docs/ngcp-network.8
pod2man --section=8 sbin/ngcp-network-validator > docs/ngcp-network-validator.8
pod2man --section=8 sbin/ngcp-sync-constants > docs/ngcp-sync-constants.8
pod2man --section=8 sbin/ngcp-sync-grants > docs/ngcp-sync-grants.8
pod2man --section=8 sbin/ngcp-sync-db-creds > docs/ngcp-sync-db-creds.8
pod2man --section=8 sbin/ngcp-sync-db-grants > docs/ngcp-sync-db-grants.8
pod2man --section=3pm lib/NGCP/Template.pm > docs/NGCP::Template.3pm
pod2man --section=3pm lib/NGCP/Template/Object.pm > docs/NGCP::Template::Object.3pm
pod2man --section=3pm lib/NGCP/Template/Plugin/Utils.pm > docs/NGCP::Template::Plugin::Utils.3pm

@ -20,8 +20,8 @@ lib/set_* usr/lib/ngcp-ngcpcfg/
sbin/ngcp-instances-validator usr/sbin/
sbin/ngcp-network usr/sbin/
sbin/ngcp-network-validator usr/sbin/
sbin/ngcp-sync-constants usr/sbin/
sbin/ngcp-sync-grants usr/sbin/
sbin/ngcp-sync-db-creds usr/sbin/
sbin/ngcp-sync-db-grants usr/sbin/
sbin/ngcpcfg usr/sbin/
schemas/instances.yml usr/share/ngcp-ngcpcfg/schemas/
schemas/sites.yml usr/share/ngcp-ngcpcfg/schemas/

@ -1,3 +1,7 @@
usr/sbin/ngcp-sync-constants usr/sbin/ngcp-sync-db-creds
usr/sbin/ngcp-sync-grants usr/sbin/ngcp-sync-db-grants
usr/sbin/ngcpcfg usr/sbin/ngcp-config
usr/share/bash-completion/completions/ngcpcfg usr/share/bash-completion/completions/ngcp-config
usr/share/man/man8/ngcp-sync-constants.8.gz usr/share/man/man8/ngcp-sync-db-creds.8.gz
usr/share/man/man8/ngcp-sync-grants.8.gz usr/share/man/man8/ngcp-sync-db-grants.8.gz
usr/share/man/man8/ngcpcfg.8.gz usr/share/man/man8/ngcp-config.8.gz

@ -1,5 +1,5 @@
docs/ngcp-network-validator.8
docs/ngcp-network.8
docs/ngcp-sync-constants.8
docs/ngcp-sync-grants.8
docs/ngcp-sync-db-creds.8
docs/ngcp-sync-db-grants.8
docs/ngcpcfg.8

@ -241,7 +241,7 @@ SQL
}
}
unless ($count) {
log_debug(sprintf "%s => does not exist in mysql, skipped (check grants.yml and run ngcp-sync-grants)", $user);
log_debug(sprintf "%s => does not exist in mysql, skipped (check grants.yml and run ngcp-sync-db-grants)", $user);
}
$sth_sel->finish;
@ -354,11 +354,11 @@ __END__
=head1 NAME
ngcp-sync-constants - synchronizes passwords from constants.yml with MySQL
ngcp-sync-db-creds - synchronizes passwords from constants.yml with MySQL
=head1 SYNOPSIS
B<ngcp-sync-constants> [I<options>...]
B<ngcp-sync-db-creds> [I<options>...]
=head1 DESCRIPTION

@ -530,7 +530,7 @@ sub main {
if ($recreate_user) {
log_info(<<MSG);
Warning: Recreated users are without passwords,
please consider running 'ngcp-sync-constants' to update passwords for them.
please consider running 'ngcp-sync-db-creds' to update passwords for them.
MSG
}
@ -549,11 +549,11 @@ __END__
=head1 NAME
ngcp-sync-grants - synchronizes mysql grants from a schema template
ngcp-sync-db-grants - synchronizes mysql grants from a schema template
=head1 SYNOPSIS
B<ngcp-sync-grants> [I<options>...]
B<ngcp-sync-db-grants> [I<options>...]
=head1 DESCRIPTION

@ -92,10 +92,10 @@ log_debug "${SCRIPTS}/etckeeper"
if [ -z "${NO_DB_SYNC:-}" ] ; then
log_info "Synchronizing MySQL grants/credentials"
ngcp-sync-grants | sed "s/^/$timestamp_replacementchars/"
ngcp-sync-constants | sed "s/^/$timestamp_replacementchars/"
ngcp-sync-db-grants | sed "s/^/$timestamp_replacementchars/"
ngcp-sync-db-creds | sed "s/^/$timestamp_replacementchars/"
else
log_debug "no-db-sync: skipping 'ngcp-sync-grants' + 'ngcp-sync-constants'"
log_debug "no-db-sync: skipping 'ngcp-sync-db-grants' + 'ngcp-sync-db-creds'"
fi
## END OF FILE #################################################################

Loading…
Cancel
Save