[Gelistirici] playground/ertugrul/experimantal/mongodb - devam

Ertuğrul Erata ertugrulerata at gmail.com
21 Tem 2010 Çar 19:46:42 EEST


@bahadır service.py de bir sorun var bir türlü servisi başlatmıyor ?

Traceback (most recent call last)
  File "/bin/service", line 369, in <module>
    main(sys.argv[1:])
  File "/bin/service", line 340, in main
    list_services(use_color)
  File "/bin/service", line 229, in list_services
    format_service_list(lala, use_color)
  File "/bin/service", line 126, in format_service_list
    cstart = "\x1b%s" % colors[service.state]
KeyError: dbus.String(u'conditional')

service list te bu hatayı veriyor. ancak service.py de geçmiyor ki ?

mongod --help te
--dbpath arg (=/data/db/) directory for datafiles



2010/7/21 Ertuğrul Erata <paketler-commits at pardus.org.tr>

> Author: ertugrul
> Date: Wed Jul 21 19:35:40 2010
> New Revision: 96210
>
> Modified:
>   playground/ertugrul/experimantal/mongodb/actions.py
>   playground/ertugrul/experimantal/mongodb/comar/service.py
>   playground/ertugrul/experimantal/mongodb/files/mongodb.confd
>   playground/ertugrul/experimantal/mongodb/pspec.xml
> Log:
> devam
>
>
>
> ---
>  actions.py          |    6 +++---
>  comar/service.py    |   35 ++++++++++++++++++-----------------
>  files/mongodb.confd |    3 +--
>  pspec.xml           |   13 ++++++-------
>  4 files changed, 28 insertions(+), 29 deletions(-)
>
> Modified: playground/ertugrul/experimantal/mongodb/actions.py
> =================================================================
> --- playground/ertugrul/experimantal/mongodb/actions.py (original)
> +++ playground/ertugrul/experimantal/mongodb/actions.py Wed Jul 21 19:35:40
> 2010
> @@ -23,9 +23,9 @@
>         pisitools.dobin("%s" % i)
>
>     # needed directory
> -    pisitools.dodir("/var/lib/mongo")
> -    pisitools.dodir("/var/log/mongo")
> -    pisitools.dodir("/var/run/mongo")
> +    pisitools.dodir("/var/lib/mongodb")
> +    pisitools.dodir("/var/log/mongodb")
> +    pisitools.dodir("/var/run/mongodb")
>
>     # add man and documents
>     pisitools.doman("debian/mongo*.1")
>
> Modified: playground/ertugrul/experimantal/mongodb/comar/service.py
> =================================================================
> --- playground/ertugrul/experimantal/mongodb/comar/service.py   (original)
> +++ playground/ertugrul/experimantal/mongodb/comar/service.py   Wed Jul 21
> 19:35:40 2010
> @@ -1,30 +1,31 @@
>
>  from comar.service import *
>
> -serviceType = "local"
> +serviceType = "server"
>  serviceConf = "mongodb"
> -serviceDefault = "conditional"
> +serviceDefault = "off"
>
>  serviceDesc = _({"en": "Mongodb",
>                  "tr": "Mongodb"})
>
> +MSG_ERR_MONGODBNOTINST = _({"en": "MongoDB is not installed.",
> +                          "tr": "MongoDB kurulu değil.",
> +                          })
> +
> +def check_mongodb():
> +    import os.path
> +    if not os.path.exists("/var/lib/mongodb"):
> +        fail(MSG_ERR_MONGODBNOTINST)
> +
>  @synchronized
>  def start():
> -    startService(command="/usr/sbin/mongodb",
> -                 args = config.get("args", "destroy"),
> +    check_mongodb()
> +    startService(command="/usr/bin/mongod",
> +                 args = "--datapath=/var/lib/mongodb",
> +                 pidfile="/var/run/mongodb/mongodb.pid",
>                  donotify=True)
> -
> +
>  @synchronized
>  def stop():
> -    stopService(command="/usr/sbin/mongodb",
> -                donotify=True)
> -
> -def ready():
> -    import os
> -    status = is_on()
> -    if status == "on" or (status == "conditional" and
> os.path.exists("/sys/coffee/ready")):
> -        start()
> -
> -def status():
> -    return checkDaemon("/var/run/mongodb.pid")
> -
> +    stopService(command="/usr/bin/mongod",
> +                donotify=True)
> \ No newline at end of file
>
> Modified: playground/ertugrul/experimantal/mongodb/files/mongodb.confd
> =================================================================
> --- playground/ertugrul/experimantal/mongodb/files/mongodb.confd
>  (original)
> +++ playground/ertugrul/experimantal/mongodb/files/mongodb.confd        Wed
> Jul 21 19:35:40 2010
> @@ -1,7 +1,6 @@
>  # Mongodb essentials
> -MONGODB_EXEC="/usr/bin/mongod"
>  MONGODB_DATA="/var/lib/mongodb"
> -MONGODB_USER="mongodb"
> +#MONGODB_USER="mongodb"
>  MONGODB_PID_FILE="/var/run/mongodb/mongodb.pid"
>
>  MONGODB_IP="127.0.0.1"
>
> Modified: playground/ertugrul/experimantal/mongodb/pspec.xml
> =================================================================
> --- playground/ertugrul/experimantal/mongodb/pspec.xml  (original)
> +++ playground/ertugrul/experimantal/mongodb/pspec.xml  Wed Jul 21 19:35:40
> 2010
> @@ -33,23 +33,22 @@
>             <Dependency>libpcap</Dependency>
>         </RuntimeDependencies>
>         <Files>
> +            <Path fileType="config">/etc</Path>
>             <Path fileType="executable">/usr/bin</Path>
> -
>             <Path fileType="doc">/usr/share/doc</Path>
>             <Path fileType="data">/usr/share/man</Path>
>             <Path fileType="data">/var</Path>
>         </Files>
> -        <!--
> +
>         <AdditionalFiles>
> -            <AdditionalFile owner="root" permission="0644"
> target="/usr/share/applications/mongodb.desktop">mongodb.desktop</AdditionalFile>
> +            <AdditionalFile owner="root" permission="0644"
> target="/etc/conf.d/mongodb">mongodb.confd</AdditionalFile>
> +            <!--<AdditionalFile owner="root" permission="0644"
> target="/usr/share/applications/mongodb.desktop">mongodb.desktop</AdditionalFile>-->
>         </AdditionalFiles>
> -        -->
> -        <!--
> +
>         <Provides>
> -            <COMAR script="package.py">System.Package</COMAR>
> +            <!--<COMAR script="package.py">System.Package</COMAR>-->
>             <COMAR script="service.py">System.Service</COMAR>
>         </Provides>
> -        -->
>     </Package>
>
>     <History>
> _______________________________________________
> paketler-commits mailing list
> paketler-commits at pardus.org.tr
> http://liste.pardus.org.tr/mailman/listinfo/paketler-commits




-- 
Ertuğrul Erata

Pardus Devel. // http://ertugerata.wordpress.com

##biraz tembelim. itiraf ediyorum##
-------------- sonraki bölüm --------------
Bir HTML eklentisi temizlendi...
URL: <http://liste.pardus.org.tr/gelistirici/attachments/20100721/b7d7f505/attachment-0002.htm>


Gelistirici mesaj listesiyle ilgili daha fazla bilgi