1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
René 'Necoro' Neumann schrieb: |
5 |
> |
6 |
> Catapult now seems quite reliable. Some functionality still has to be |
7 |
> implemented: |
8 |
[...] |
9 |
> - allow the server to be stopped from outside. this is esp. important |
10 |
> when installing a new version - the old version running should then stop |
11 |
> and the new one should start ;) |
12 |
|
13 |
This is now allowed. I added another DBus-Interface |
14 |
(org.gentoo.catapult.Admin) which currently holds the two methods |
15 |
"stop()" and "ping()". The first one does the job :). "Ping" is kind of |
16 |
a start up function: it pings the service - and if the service is not |
17 |
started already, dbus launches it. |
18 |
|
19 |
I also extended the catapult-start.sh: I renamed it to "catapult.sh" and |
20 |
make it accept four commands: |
21 |
|
22 |
- - start: Starts the service - the script does not return # old |
23 |
catapult-start.sh bevavior |
24 |
- - stop: Stops the service |
25 |
- - ping: Pings the service --> startup WITH returning (see note above) |
26 |
- - status: Checks whether the service has been started. As the catapult |
27 |
services a run on the session bus, it can only give information about |
28 |
the current user. |
29 |
|
30 |
So a restart of e.g. the catapult portage service would look like: |
31 |
|
32 |
if catapult status portage; then |
33 |
catapult stop portage |
34 |
catapult ping portage |
35 |
fi |
36 |
|
37 |
A similar algorithm is used by the catapult-portage ebuild in the |
38 |
pkg_postinst function to restart the root's service (or whoever ran the |
39 |
emerge command). |
40 |
|
41 |
Regards, |
42 |
Necoro |
43 |
-----BEGIN PGP SIGNATURE----- |
44 |
Version: GnuPG v1.4.7 (GNU/Linux) |
45 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org |
46 |
|
47 |
iD8DBQFHLlr44UOg/zhYFuARAjghAJ9IRA5R29O25OF0sKKoLqwaHBp89ACfTGKe |
48 |
2CkmnA8aS3nyw8dzkS4LqDA= |
49 |
=smMS |
50 |
-----END PGP SIGNATURE----- |
51 |
-- |
52 |
gentoo-guis@g.o mailing list |