Koha/debian/scripts
Magnus Enger ae8223e333 Bug 17265 - Make koha-create-defaults less greedy
koha-create-defaults substitutes the instance name with the placeholder
__KOHASITE__ in the SQL file that it creates. If the instance name is
something common, like "data", this means that way too many substitutions
will be made, and when koha-create uses the SQL file as a template, broken
data can be the result.

The solution in this patch was suggested by drojf on IRC.

To test:
- Create an instance called "data"
- Run "sudo koha-dump-defaults data > test.sql"
- Take a look at test.sql and verify there are way too many occurences
  of __KOHASITE__, like "-- Dumping __KOHASITE__ for table `accountlines`"
- Apply the patch
- Copy the resulting koha-create and koha-dump-defaults to somewhere
  running off the packages
- Run "sudo koha-dump-defaults data > test.sql" again and verify there
  are only 4 occurrences of __KOHASITE__, in places that make sense
- Create an instance with something like:
  $ gzip test.sql
  $ sudo koha-create --create-db --defaultsql test.sql.gz test17265
- Verify that you have a working Koha install

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as expected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 11:33:11 +00:00
..
koha-create Bug 17265 - Make koha-create-defaults less greedy 2017-01-13 11:33:11 +00:00
koha-create-dirs Bug 14674: koha-create should populate upload_path 2015-10-23 10:09:32 -03:00
koha-disable Bug 13785: (QA followup) koha-disable should stop the indexer daemon 2015-03-11 14:43:32 -03:00
koha-dump Bug 14532: (followup) Use tar's --exclude for simplicity 2016-03-02 04:39:51 +00:00
koha-dump-defaults Bug 17265 - Make koha-create-defaults less greedy 2017-01-13 11:33:11 +00:00
koha-email-disable Bug 11404: koha-functions.sh introduced for reuse 2014-05-19 21:49:06 +00:00
koha-email-enable Bug 11404: koha-functions.sh introduced for reuse 2014-05-19 21:49:06 +00:00
koha-enable Bug 11404: koha-functions.sh introduced for reuse 2014-05-19 21:49:06 +00:00
koha-enable-sip
koha-foreach Bug 15303 Letsencrypt option for Debian package installations 2016-04-29 13:04:31 +00:00
koha-functions.sh Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
koha-indexer Bug 16830: Remove -x usage on koha-indexer 2016-08-04 19:41:41 +00:00
koha-list Bug 15303 Letsencrypt option for Debian package installations 2016-04-29 13:04:31 +00:00
koha-mysql Bug 12372: (QA followup) Standardized argument parsing for koha-mysql. 2015-08-24 13:18:08 -03:00
koha-mysqlcheck Bug 11404: koha-functions.sh introduced for reuse 2014-05-19 21:49:06 +00:00
koha-passwd Bug 13143 - Detect if the password is in a pipe 2016-01-27 06:27:08 +00:00
koha-plack Bug 16974: Make koha-plack should check and fix log files permissions 2016-08-17 17:58:19 +00:00
koha-rebuild-zebra [SIGNED-OFF] Bug 15113: koha-rebuild-zebra should check USE_INDEXER_DAEMON and skip if enabled 2016-04-19 17:47:42 +00:00
koha-remove Bug 4880: Make koha-remove stop all instance's services 2016-10-28 16:42:36 +00:00
koha-reset-passwd Bug 11404: koha-functions.sh introduced for reuse 2014-05-19 21:49:06 +00:00
koha-restart-zebra Bug 13896: (QA followup) fix koha-{stop|restart}-zebra too 2015-04-08 14:56:44 -03:00
koha-restore Bug 11404: koha-functions.sh introduced for reuse 2014-05-19 21:49:06 +00:00
koha-run-backups
koha-shell Bug 15012: use sudo instead of su in koha-shell 2015-10-22 00:02:50 -03:00
koha-sitemap Bug 16016: Sitemap handling scripts for packages 2016-05-04 13:34:21 +00:00
koha-start-sip Bug 7904 - remove unnecessary path from SIP script 2015-02-05 14:44:48 -03:00
koha-start-zebra Bug 15714: Remove zebra.log and add loglevels 2016-02-24 03:38:18 +00:00
koha-stop-sip
koha-stop-zebra Bug 16885: koha-stop-zebra should be more sure of stopping zebrasrv 2016-08-17 17:57:15 +00:00
koha-translate Bug 14203: Message for non-existent lang removal 2015-05-26 10:42:05 -03:00
koha-upgrade-schema
koha-upgrade-to-3.4