[Planetlab-devel] a patch for smoother remote control of a myplc
Thierry Parmentelat
Thierry.Parmentelat at sophia.inria.fr
Mon Jun 18 09:35:13 EDT 2007
Sorry, the patch I just sent is not complete, some more similar changes
were required
Sorry about that -- here is the complete patch, hopefully
-- Thierry
Index: plc.d/mail
===================================================================
--- plc.d/mail (revision 544)
+++ plc.d/mail (revision 550)
@@ -30,7 +30,7 @@
# without a warning, so that the API can send out mail.
echo "apache" >/etc/mail/trusted-users
- service sendmail start
+ (exec 3>&- 4>&- ; service sendmail start)
check
result "$MESSAGE"
@@ -40,7 +40,7 @@
MESSAGE=$"Stopping mail server"
dialog "$MESSAGE"
- service sendmail stop
+ (exec 3>&- 4>&- ; service sendmail start)
check
result "$MESSAGE"
Index: plc.d/postgresql
===================================================================
--- plc.d/postgresql (revision 544)
+++ plc.d/postgresql (revision 550)
@@ -29,7 +29,7 @@
postgresql_start ()
{
# start() always returns 0
- service postgresql start
+ (exec 3>&- 4>&- ; service postgresql start)
# status() will still return 0 even while still initializing
if status postmaster && [ -f /var/lock/subsys/postgresql ] ; then
Index: plc.d/functions
===================================================================
--- plc.d/functions (revision 544)
+++ plc.d/functions (revision 550)
@@ -56,7 +56,16 @@
[ -n "${pid:-}" -a -z "${force:-}" ] && return
# And start it up.
- (exec -a plc_${base} $*)
+ (exec 3>&- 4>&- ; exec -a plc_${base} $*)
ret=$?
if [ -f /var/run/${base}.pid ] ; then
More information about the Devel
mailing list