[campsite-dev] 1315: create-instance does not work on FreeBSD - Ondra please read
  • --0-177203005-1123662401=:64410
    Content-Type: text/plain; charset=iso-8859-1
    Content-Transfer-Encoding: 8bit
    Content-Id:
    Content-Disposition: inline

    Hi Ondra,

    Please try the attached scripts: backup_instance.php, remove_instance.php and
    create_instance.php. I deleted \$ from command line parameters, although it
    should be supported by bash and this is the correct quoting of the parameters,
    see man bash - search for QUOTING:

    "Words of the form $'string' are treated specially. The word expands to string,
    with backslash-escaped characters replaced as specified by the ANSI C
    standard."

    Also, there are quoting sequences like: $" in campsite scripts. Please test
    these attached scripts and if they still don't work try removing $" quoting.

    Mugur

    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
    --0-177203005-1123662401=:64410
    Content-Type: application/x-httpd-php; name="backup_instance.php"
    Content-Transfer-Encoding: base64
    Content-Description: 2508091043-backup_instance.php
    Content-Disposition: attachment; filename="backup_instance.php"

    PD9waHAKCmlmICghaXNfYXJyYXkoJEdMT0JBTFNbJ2FyZ3YnXSkpIHsKCWVj
    aG8gIkNhbid0IHJlYWQgY29tbWFuZCBsaW5lIGFyZ3VtZW50c1xuIjsKCWV4
    aXQoMSk7Cn0KCiRldGNfZGlyID0gaXNzZXQoJEdMT0JBTFNbJ2FyZ3YnXVsx
    XSkgPyB0cmltKCRHTE9CQUxTWydhcmd2J11bMV0pIDogIiI7CiRpbnN0YW5j
    ZV9uYW1lID0gaXNzZXQoJEdMT0JBTFNbJ2FyZ3YnXVsyXSkgPyB0cmltKCRH
    TE9CQUxTWydhcmd2J11bMl0pIDogIiI7CiRhcmczID0gaXNzZXQoJEdMT0JB
    TFNbJ2FyZ3YnXVszXSkgPyB0cmltKCRHTE9CQUxTWydhcmd2J11bM10pIDog
    IiI7CgppZiAoJGV0Y19kaXIgPT0gIiIpCglkaWUoIlBsZWFzZSBzdXBwbHkg
    dGhlIGNvbmZpZ3VyYXRpb24gZGlyZWN0b3J5IGFzIHRoZS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Zp
    bmFsIGFyY2hpdmUKJGNtZCA9ICJwdXNoZCAkYmFja3VwX2RpciA+IC9kZXYv
    bnVsbCAmJiB0YXIgY2YgIgoJLiBlc2NhcGVzaGVsbGFyZygiJGluc3RhbmNl
    X25hbWUtYmFrLnRhciIpCgkuICIgKi50YXIuZ3ogJiYgcG9wZCA+IC9kZXYv
    bnVsbCI7CmV4ZWNfY29tbWFuZCgkY21kKTsKdW5saW5rKCIkYmFja3VwX2Rp
    ci8kaW5zdGFuY2VfbmFtZS1jb25mLnRhci5neiIpOwp1bmxpbmsoIiRiYWNr
    dXBfZGlyLyRpbnN0YW5jZV9uYW1lLWltYWdlcy50YXIuZ3oiKTsKdW5saW5r
    KCIkYmFja3VwX2Rpci8kaW5zdGFuY2VfbmFtZS1sb29rLnRhci5neiIpOwp1
    bmxpbmsoIiRiYWNrdXBfZGlyLyRpbnN0YW5jZV9uYW1lLWRhdGFiYXNlLnRh
    ci5neiIpOwp1bmxpbmsoIiRiYWNrdXBfZGlyLyRpbnN0YW5jZV9uYW1lLWRh
    dGFiYXNlLnNxbCIpOwoKPz4K

    --0-177203005-1123662401=:64410
    Content-Type: text/plain; name="create_instance_php"
    Content-Disposition: inline; filename="create_instance_php"
    Content-Transfer-Encoding: 8bit

    The create_instance_php file that was initially attached to this message has been stored of the mailing lists server :
    http://sympa.mdlf.org/wws/attach/campsite-dev/20050810082641.64763.qmail@web51708.mail.yahoo.com/create_instance.php

    --0-177203005-1123662401=:64410
    Content-Type: application/x-httpd-php; name="remove_instance.php"
    Content-Transfer-Encoding: base64
    Content-Description: 3584528221-remove_instance.php
    Content-Disposition: attachment; filename="remove_instance.php"

    PD9waHAKCmlmICghaXNfYXJyYXkoJEdMT0JBTFNbJ2FyZ3YnXSkpIHsKCWVj
    aG8gIkNhbid0IHJlYWQgY29tbWFuZCBsaW5lIGFyZ3VtZW50c1xuIjsKCWV4
    aXQoMSk7Cn0KCiRldGNfZGlyID0gaXNzZXQoJEdMT0JBTFNbJ2Fy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W1lIjsKJGNtZCA9ICJybSAtZnIgJyR3d3dfZGlyJyI7CmV4ZWNfY29tbWFu
    ZCgkY21kKTsKCi8vIGNoZWNrIGlmIHRoZSBkYXRhYmFzZSBjb25mIGZpbGUg
    ZXhpc3RzCiRkYXRhYmFzZV9jb25mX2ZpbGUgPSAiJGV0Y19kaXIvJGluc3Rh
    bmNlX25hbWUvZGF0YWJhc2VfY29uZi5waHAiOwppZiAoIWlzX2ZpbGUoJGRh
    dGFiYXNlX2NvbmZfZmlsZSkpCglleGl0KDApOwoKLy8gZHJvcCBkYXRhYmFz
    ZQpyZXF1aXJlX29uY2UoJGRhdGFiYXNlX2NvbmZfZmlsZSk7CmlmIChjb25u
    ZWN0X3RvX2RhdGFiYXNlKCkgIT0gMCkKCWV4aXRfd2l0aF9lcnJvcigkcmVz
    KTsKbXlzcWxfcXVlcnkoIkRST1AgREFUQUJBU0UgJGluc3RhbmNlX25hbWUi
    KTsKCi8vIHJlbW92ZSBldGMgZGlyZWN0b3J5CiRjbWQgPSAicm0gLWZyICck
    ZXRjX2Rpci8kaW5zdGFuY2VfbmFtZSciOwpleGVjX2NvbW1hbmQoJGNtZCk7
    Cgo/Pgo=

    --0-177203005-1123662401=:64410--

    ------------------------------------------
    Posted to Phorum via PhorumMail
  • 1 Comment sorted by
  • I'm currently working on these scripts as well, for the RPM version.
    I'll send you what I've got soon as it's done.

    Mugur Rus wrote:

    >Hi Ondra,
    >
    >Please try the attached scripts: backup_instance.php, remove_instance.php and
    >create_instance.php. I deleted \$ from command line parameters, although it
    >should be supported by bash and this is the correct quoting of the parameters,
    >see man bash - search for QUOTING:
    >
    >"Words of the form $'string' are treated specially. The word expands to string,
    >with backslash-escaped characters replaced as specified by the ANSI C
    >standard."
    >
    >Also, there are quoting sequences like: $" in campsite scripts. Please test
    >these attached scripts and if they still don't work try removing $" quoting.
    >
    >Mugur
    >
    >__________________________________________________
    >Do You Yahoo!?
    >Tired of spam? Yahoo! Mail has the best spam protection around
    >http://mail.yahoo.com
    >

    ------------------------------------------
    Posted to Phorum via PhorumMail