Bugzilla – Attachment 71939 Details for
Bug 18913
Allow symbolic link in /etc/koha/sites
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18913: Allow symbolic link in /etc/koha/sites
Bug-18913-Allow-symbolic-link-in-etckohasites.patch (text/plain), 1.91 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-02-19 13:11:26 UTC
(
hide
)
Description:
Bug 18913: Allow symbolic link in /etc/koha/sites
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-02-19 13:11:26 UTC
Size:
1.91 KB
patch
obsolete
>From 0e25ec8d8cf83996bd2033c59a3b8195530983d2 Mon Sep 17 00:00:00 2001 >From: Pongtawat C <pongtawat@punsarn.asia> >Date: Sun, 9 Jul 2017 23:34:17 +0700 >Subject: [PATCH] Bug 18913: Allow symbolic link in /etc/koha/sites > >This patch makes the koha-* scripts follow symbolic links when querying for >Koha instances. Without it, it is not possible to define instances outside the >/etc/koha/sites directory, > >To test: >- Create a symlink in /etc/koha/sites: > $ sudo ln -s /tmp /etc/koha/sites/test >- Test the original is_instance function: > $ . /usr/share/koha/bin/koha-functions.sh > $ is_instance test && echo success || echo failure >=> FAIL: symlinks are not considered instance names (i.e. failure is printed) >- Apply this patch >- Update the koha-functions.sh file: > $ perl misc4dev/cp_debian_files.pl >- Test is_instance again: > $ . /usr/share/koha/bin/koha-functions.sh > $ is_instance test && echo success || echo failure >=> SUCCESS: symlinks are considered instance names (i.e. success is printed) >- Sign off :-D > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > debian/scripts/koha-functions.sh | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh >index 256ae2b700..6e189b6c94 100755 >--- a/debian/scripts/koha-functions.sh >+++ b/debian/scripts/koha-functions.sh >@@ -104,7 +104,7 @@ is_instance() > { > local instancename=$1 > >- if find /etc/koha/sites -mindepth 1 -maxdepth 1 \ >+ if find -L /etc/koha/sites -mindepth 1 -maxdepth 1 \ > -type d -printf '%f\n'\ > | grep -q -x "$instancename" ; then > return 0 >@@ -239,7 +239,7 @@ adjust_paths_dev_install() > > get_instances() > { >- find /etc/koha/sites -mindepth 1 -maxdepth 1\ >+ find -L /etc/koha/sites -mindepth 1 -maxdepth 1\ > -type d -printf '%f\n' | sort > } > >-- >2.14.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18913
:
64935
|
68511
| 71939