Browse Source

fixed autoconf installation

pull/6/head
Roland Gruber 6 years ago
parent
commit
cd46b06dd4
  1. 8
      lam-packaging/autoconf/Makefile.in
  2. 4
      lam/lib/upgrade.inc

8
lam-packaging/autoconf/Makefile.in

@ -68,7 +68,7 @@ install-lam:
(cd $(srcdir) ; $(COPY) $${i}/.htaccess \
$(DESTDIR)$(localstatedir)/$${i}) ; \
done ; \
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d *)`" ; \
(cd $(srcdir)/$(LIST3) ; $(TAR) cf - .) | \
(cd $(DESTDIR)$(sysconfdir) ; $(TAR) xf -) ; \
$(LN_S) $(sysconfdir) ${LIST3} ; \
@ -91,10 +91,11 @@ do-chown:
@for i in $(LIST2) ; do \
$(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(localstatedir)/$${i} ; \
done ; \
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d *)`" ; \
for i in $${LIST4} ; do \
$(CHOWN) -R $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/$${i} ; \
done
$(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/config
echo-chown:
@ -103,11 +104,12 @@ echo-chown:
echo "$(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(localstatedir)/$${i}" \
>> $(RAR) ; \
done ; \
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d * | $(GREP) -v sample)`" ; \
LIST4="`(cd $(srcdir)/$(LIST3) ; ls -d *)`" ; \
for i in $${LIST4} ; do \
echo "$(CHOWN) -R $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/$${i}" \
>> $(RAR) ; \
done ; \
echo $(CHOWN) $(HTTPD_USER):$(HTTPD_GROUP) $(DESTDIR)$(sysconfdir)/config
echo "Switch user to root and run $(RAR)"

4
lam/lib/upgrade.inc

@ -114,7 +114,7 @@ function upgradeConfigToServerProfileFolders($profiles) {
// copy default configs
if (!file_exists('../config/templates')) {
@mkdir('../config/templates');
@mkdir('../config/templates', 0700);
recursiveCopy('../config/pdf/', '../config/templates/pdf/', $profiles, 'default.');
recursiveCopy('../config/profiles/', '../config/templates/profiles/', $profiles, 'default.');
}
@ -163,7 +163,7 @@ function copyConfigTemplates($profiles) {
function recursiveCopy($src, $dst, $profiles, $fileFilter = null, $overwrite = true) {
$dir = @opendir($src);
if (!file_exists($dst)) {
$tmpState = @mkdir($dst);
$tmpState = @mkdir($dst, 0700, true);
if ($tmpState === false) {
StatusMessage('ERROR', 'Upgrade failed.', 'The directory \'' . $dst . '\' could not be created.');
}

Loading…
Cancel
Save