Results 1 to 4 of 4

Thread: libexec/zmldapinit bad sed syntax?

  1. #1
    langthang Guest

    Default libexec/zmldapinit bad sed syntax?

    I tried to file a bug report but it keeps telling me to select a Component even I did so I report it here instead.
    I try to install zcs-4.0.0_GA_303.DEBIAN3.1.tar.gz and it failed, trace it to
    Code:
    mail:/opt/zimbra# su - zimbra -c "libexec/zmldapinit"
    sed: -e expression #1, char 61: Extra characters after command
    ERROR - failed to start slapd
    patch libexec/zmldapinit with
    Code:
    --- libexec/zmldapinit.orig     2006-09-07 15:48:49.000000000 -0700
    +++ libexec/zmldapinit  2006-09-07 15:51:05.000000000 -0700
    @@ -66,7 +66,8 @@
                    sed -e '\|/opt/zimbra/openldap/etc/openldap/schema/zimbra.schema| a\
                    include "/opt/zimbra/lib/conf/zimbra-ext.schema"' ${config_dir}/slapd.conf.in > /tmp/slapd.conf
            else
    -               sed -e '\|/opt/zimbra/openldap/etc/openldap/schema/zimbra.schema| a include "/opt/zimbra/lib/conf/zimbra-ext.schema"' ${config_dir}/slapd.conf.in > /tmp/slapd.conf
    +               sed -e '\|/opt/zimbra/openldap/etc/openldap/schema/zimbra.schema| a \
    +include "/opt/zimbra/lib/conf/zimbra-ext.schema"' ${config_dir}/slapd.conf.in > /tmp/slapd.conf
            fi
            mv -f /tmp/slapd.conf ${config_dir}/slapd.conf.in
     fi
    will let the install went through.

  2. #2
    marcmac is offline Expert Member
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    13

    Default

    plat=`/opt/zimbra/libexec/get_plat_tag.sh`
    if [ "x$plat" = "xMACOSX" -o "x$plat" = "xMACOSXx86" ]; then
    EDITED after drinking coffee:

    What veersion of debian are you on? I've only seen that sed syntax required on the mac, which is why the previous sed line contains the syntax that you want.

    What does sed --version return for you?
    Last edited by marcmac; 09-08-2006 at 08:27 AM.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    langthang Guest

    Default

    Quote Originally Posted by marcmac
    EDITED after drinking coffee
    I need some too
    Quote Originally Posted by marcmac
    What veersion of debian are you on?
    Code:
    $ cat /etc/debian_version
    3.1
    Quote Originally Posted by marcmac
    I've only seen that sed syntax required on the mac, which is why the previous sed line contains the syntax that you want.

    What does sed --version return for you?
    Code:
    $ sed --version
    GNU sed version 4.1.2
    but I can't reproduce it anymore may be I did try to install on a older debian verison. Anyway a newline after a\ is safe for all sed I think.

  4. #4
    langthang Guest

    Default

    it was sed installed with debian 3.0 causes problem.
    Code:
    $ echo -e "foo\n123" > /tmp/foobar && sed '/^foo/a \bar' /tmp/foobar
    sed: -e expression #1, char 10: Extra characters after command
    $ echo -e "foo\n123" > /tmp/foobar && sed '/^foo/a \
    > bar' /tmp/foobar
    foo
    bar
    123
    most sed man pages I found have
    a \
    text Insert text, blahblah ...
    I guess you can replace that block with just one sed line instead

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Antivirus is blocking emails in deffered queue
    By sergiumartin in forum Administrators
    Replies: 15
    Last Post: 07-14-2007, 03:04 PM
  2. zcs 4.0.3 amavisd gives bad file descriptor
    By Storm16 in forum Developers
    Replies: 0
    Last Post: 11-07-2006, 11:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •