[systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Michał Piotrowski
Hi, I want to rewrite postgresql and mysqld init scripts for my system (later, of course, I want to share them with others) and I wonder if there are any recomendations how to rewrite complex scripts. Postgresql script has perform_initdb(), initdb() and upgrade() functions. IMO these functions

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Gustavo Sverzut Barbieri
2011/4/9 Michał Piotrowski mkkp...@gmail.com: Hi, I want to rewrite postgresql and mysqld init scripts for my system (later, of course, I want to share them with others) and I wonder if there are any recomendations how to rewrite complex scripts. Postgresql script has perform_initdb(),

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Michał Piotrowski
2011/4/9 Tom Lane t...@redhat.com: Gustavo Sverzut Barbieri barbi...@profusion.mobi writes: 2011/4/9 Michał Piotrowski mkkp...@gmail.com: Postgresql script has perform_initdb(), initdb() and upgrade() functions. ... Mysql script also has some data dir creation code - I think it can also be

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Kay Sievers
2011/4/9 Michał Piotrowski mkkp...@gmail.com: If you take an absolutist position that systemd scripts cannot be used for such purposes, that will either result in kluged-up solutions or non-adoption of systemd.  You'd be better off in the long run to realize that there is a reason for the

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Mirco Tischler
Hi 2011/4/9 Michał Piotrowski mkkp...@gmail.com Hi, ... Mysql script also has some data dir creation code - I think it can also be moved to separated script. Thoughts, recommendations, comments are welcome -- Best regards, Michal Have you considered using a file in /etc/tmpfiles.d

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Michał Piotrowski
W dniu 9 kwietnia 2011 18:54 użytkownik Mirco Tischler mt...@gmx.de napisał: Hi 2011/4/9 Michał Piotrowski mkkp...@gmail.com Hi, ... Mysql script also has some data dir creation code - I think it can also be moved to separated script. Thoughts, recommendations, comments are welcome --

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Michał Piotrowski
W dniu 9 kwietnia 2011 18:57 użytkownik Michał Piotrowski mkkp...@gmail.com napisał: W dniu 9 kwietnia 2011 18:54 użytkownik Mirco Tischler mt...@gmx.de napisał: Hi 2011/4/9 Michał Piotrowski mkkp...@gmail.com Hi, ... Mysql script also has some data dir creation code - I think it can also

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Mirco Tischler
2011/4/9 Michał Piotrowski mkkp...@gmail.com Have you considered using a file in /etc/tmpfiles.d and let syBstemd take care of this? Mirco No, but I think that this is a good idea. Thanks! Hmmm... but what if I want to change default dir? I use /home/data/ instead of

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Michał Piotrowski
W dniu 9 kwietnia 2011 20:18 użytkownik Mirco Tischler mt...@gmx.de napisał: 2011/4/9 Michał Piotrowski mkkp...@gmail.com  Have you considered using a file in /etc/tmpfiles.d and let syBstemd take care of this? Mirco No, but I think that this is a good idea. Thanks! Hmmm...

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Lennart Poettering
On Sat, 09.04.11 12:15, Gustavo Sverzut Barbieri (barbi...@profusion.mobi) wrote: 2011/4/9 Michał Piotrowski mkkp...@gmail.com: Hi, I want to rewrite postgresql and mysqld init scripts for my system (later, of course, I want to share them with others) and I wonder if there are any

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Lennart Poettering
On Sat, 09.04.11 16:39, Michał Piotrowski (mkkp...@gmail.com) wrote: Hi, I want to rewrite postgresql and mysqld init scripts for my system (later, of course, I want to share them with others) and I wonder if there are any recomendations how to rewrite complex scripts. Postgresql script

Re: [systemd-devel] PgSQL, MySQL systemd services - how to rewrite complex init scripts?

2011-04-09 Thread Lennart Poettering
On Sat, 09.04.11 18:28, Michał Piotrowski (mkkp...@gmail.com) wrote: 2011/4/9 Tom Lane t...@redhat.com: Gustavo Sverzut Barbieri barbi...@profusion.mobi writes: 2011/4/9 Michał Piotrowski mkkp...@gmail.com: Postgresql script has perform_initdb(), initdb() and upgrade() functions. ...