Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 527724 - net-nds/openldap - /etc/init.d/slapd: eval: line 51: syntax error near unexpected token `('
Summary: net-nds/openldap - /etc/init.d/slapd: eval: line 51: syntax error near unexpe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords:
: 528592 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-11-01 09:48 UTC by Conrad Kostecki
Modified: 2014-11-10 00:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2014-11-01 09:48:10 UTC
Hi!
It seems, that openldap has a new check for testing the config file?

root@Galactica /etc/openldap/ssl $ /etc/init.d/slapd start
 * Caching service dependencies ...                                                                                                                                                     [ ok ]
/etc/init.d/slapd: eval: Zeile 51: Syntaxfehler beim unerwarteten Wort `('
/etc/init.d/slapd: eval: Zeile 51: `awk /^(directory|olcDbDirectory:)/{print $2} /etc/openldap/slapd.conf'
config file testing succeeded
 * Starting ldap-server ...                                                                                                                                                             [ ok ]

The check fails, but openldap starts and IS WORKING. So there seems something to be wrong?

When I remove the folowing lines, the error is gone:

> DBDIRS=`eval awk '/^(directory|olcDbDirectory:)/{print $2}' $CONF`
> for d in $DBDIRS; do
>   if [ ! -d $d ]; then
>     eerror "Directory $d in config does not exist!"
>     return 1
>   fi
>   /usr/bin/find $d ! -name DB_CONFIG ! -user ldap -o ! -group ldap |grep -sq .
>   if [ $? -ne 0 ]; then
>     ewarn "You have files in $d not owned by the ldap user, you must ensure they are accessible to the slapd instance!"
>   fi
>   [ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, slapd performance may be sub-optimal"
> done

root@Galactica /etc/openldap $ cat /etc/openldap/slapd.conf|grep -E "directory|olcDbDirectory"
directory       /var/lib/openldap-data

Conrad
Comment 1 Conrad Kostecki gentoo-dev 2014-11-01 09:51:58 UTC
Sorry, here is the output in english:
root@Galactica /etc/openldap $ LANG=C /etc/init.d/slapd start
/etc/init.d/slapd: eval: line 51: syntax error near unexpected token `('
/etc/init.d/slapd: eval: line 51: `awk /^(directory|olcDbDirectory:)/{print $2} /etc/openldap/slapd.conf'
config file testing succeeded
 * Starting ldap-server ...                                                                                                                                                             [ ok ]

Portage 2.2.14 (python 3.4.2-final-0, default/linux/amd64/13.0, gcc-4.9.1, glibc-2.20, 3.17.0-gentoo x86_64)
=================================================================
System uname: Linux-3.17.0-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_E680_@_1.60GHz-with-gentoo-2.2
KiB Mem:     2052096 total,     86020 free
KiB Swap:    2621436 total,   2416160 free
Timestamp of tree: Sat, 01 Nov 2014 09:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.1.10 [enabled]
app-shells/bash:          4.3_p30
dev-lang/perl:            5.20.1-r2
dev-lang/python:          2.7.8, 3.4.2
dev-util/ccache:          3.1.10
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.2
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.3
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.17 (virtual/os-headers)
sys-libs/glibc:           2.20
Repositories: gentoo galactica
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=atom -O3 -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mmovbe -msahf -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=atom -O3 -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -mmovbe -msahf -pipe -fomit-frame-pointer -mfpmath=sse -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/etc/systemd/network/* /etc/systemd/system/* /etc/xinetd.d/* /usr/lib64/systemd/system/* /usr/lib64/systemd/system-shutdown/*"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j3 -l2"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--delete-before --delete-excluded --exclude-from=/etc/portage/rsync_excludes --stats"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="amd64 bash-completion berkdb bzip2 cairo caps cgi cracklib crypt ctype curl cvs cxx exif fontconfig ftp gd gif git gmp gnutls graphviz hddtemp iconv icu idn ipv6 javascript jit jpeg jpeg2k lcms ldap lm_sensors lzma lzo mime mmxext mysql mysqli ncurses nls nntp nptl offensive openmp pam pcre perl png python readline samba session simplexml slang sockets spell sqlite sse2 ssl ssse3 subversion suid svg symlink tcpd threads tiff truetype udev unicode usb vhosts vim-syntax xml zlib" ABI_X86="64" COLLECTD_PLUGINS="apcups cgroups conntrack contextswitch cpu df disk dns entropy ethstat exec filecount hddtemp interface iptables irq load logfile md memory mysql netlink nfs nginx ntpd openvpn ping processes rrdcached sensors serial swap table tcpconns unixsock uptime users wireless" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="pc" KERNEL="linux" LCD_DEVICES="lcd2usb glcd2usb" LINGUAS="de" NGINX_MODULES_HTTP="access auth_basic autoindex charset fancyindex fastcgi gzip proxy rewrite spdy stub_status" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" USERLAND="GNU"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, LC_ALL
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-08 14:55:37 UTC
*** Bug 528592 has been marked as a duplicate of this bug. ***
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-11-10 00:50:46 UTC
Fixed InCVS.